Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifier 'FastRender' has already been declared #20

Closed
achirkof opened this issue May 28, 2018 · 5 comments
Closed

Identifier 'FastRender' has already been declared #20

achirkof opened this issue May 28, 2018 · 5 comments

Comments

@achirkof
Copy link

achirkof commented May 28, 2018

(STDERR) /home/smwk/develop/smartworkout-web/.meteor/local/build/programs/server/packages/staringatlights_fast-render.js:46
(STDERR) const FastRender = {
(STDERR)       ^
(STDERR)
(STDERR) SyntaxError: Identifier 'FastRender' has already been declared
(STDERR)     at createScript (vm.js:80:10)
(STDERR)     at Object.runInThisContext (vm.js:139:10)
(STDERR)     at /home/smwk/develop/smartworkout-web/.meteor/local/build/programs/server/boot.js:393:30
(STDERR)     at Array.forEach (<anonymous>)
(STDERR)     at /home/smwk/develop/smartworkout-web/.meteor/local/build/programs/server/boot.js:220:19
(STDERR)     at profileWrapper (/home/smwk/develop/smartworkout-web/.meteor/local/build/programs/server/profile.js:288:16)
(STDERR)     at /home/smwk/develop/smartworkout-web/.meteor/local/build/programs/server/boot.js:471:5
(STDERR)     at profileWrapper (/home/smwk/develop/smartworkout-web/.meteor/local/build/programs/server/profile.js:288:16)
(STDERR)     at time (/home/smwk/develop/smartworkout-web/.meteor/local/build/programs/server/profile.js:309:28)
(STDERR)     at Function.run (/home/smwk/develop/smartworkout-web/.meteor/local/build/programs/server/profile.js:522:14)
(STDERR)     at /home/smwk/develop/smartworkout-web/.meteor/local/build/programs/server/boot.js:470:11

Meteor 1.7

Packages:

accounts-password@1.5.1
chrismbeckett:toastr
email@1.2.3
fortawesome:fontawesome
http@1.4.1
iron:router
kevohagan:sweetalert
less@2.7.12
meteorhacks:ssr
natestrauser:animate-css
raix:handlebar-helpers
service-configuration@1.0.11
twbs:bootstrap
underscore@1.0.10
zimme:active-route
monbro:iron-router-breadcrumb
peppelg:bootstrap-3-modal
reactive-var@1.0.11
reactive-dict@1.2.0
mizzao:bootboxjs
workman:x-editable-reactive-template
natestrauser:x-editable-bootstrap
meteor-base@1.4.0
mobile-experience@1.0.5
mongo@1.5.0
blaze-html-templates@1.0.4
session@1.1.7
tracker@1.2.0
logging@1.1.20
reload@1.2.0
random@1.1.0
ejson@1.1.0
spacebars@1.0.12
check@1.3.1
okgrow:router-autoscroll
rzymek:fullcalendar@3.8.0
momentjs:moment
cfs:graphicsmagick
meteorhacks:search-source
mizzao:timesync
simple:json-routes
mizzao:user-status
nimble:restivus
shell-server@0.3.1
standard-minifier-css@1.4.1
standard-minifier-js@2.3.4
aldeed:collection2-core@2.1.2
aldeed:schema-deny@3.0.0
aldeed:schema-index@3.0.0
ecmascript@0.11.0
perak:codemirror
force-ssl@1.1.0
jquery@1.11.10
ostrio:files
dynamic-import@0.4.0
alanning:roles
meteorhacks:npm
npm-container
wylio:mandrill
staringatlights:fast-render

Here the place where error appear:

 29 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 30 //                                                                                                          //
 31 // packages/staringatlights_fast-render/lib/server/namespace.js                                             //
 32 //                                                                                                          //
 33 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
 34 //
 35 module.export({
 36   FastRender: () => FastRender
 37 });
 38 const FastRender = {
 39   _routes: [],
 40   _onAllRoutes: []
 41 };
 42
 43 module.export({
 44   FastRender: () => FastRender
 45 });
 46 const FastRender = {
 47   _routes: [],
 48   _onAllRoutes: []
 49 };

After compiling project some code duplicated.

How to fix this issue?

@abecks
Copy link
Owner

abecks commented May 28, 2018

Not sure whats happening here yet, could be related to Meteor 1.7, which I haven't tested yet. Did this happen on 1.6?

@achirkof
Copy link
Author

No, I have tested it on Meteor 1.6.1.1 and it was another error described in issue #19 , but not this.

@moberegger
Copy link

moberegger commented Jun 5, 2018

I had the same problem. Only an issue with Meteor 1.7 and 1.7.0.1.

I think the problem is that files are being loaded or evaluated twice because both api.mainModule and
api.addFiles are used in the package.js. Not sure of the root cause of this is, though.

I think the solution is to have everything loaded through the mainModule entry points, but I'm not sure what affect that will have in regards to backwards compatibility.

@banjerluke
Copy link

I can confirm that @moberegger is correct. Since api.versionsFrom is set to version 1.6.1 anyway, I don't think we need to worry about backwards compatibility. I created a pull request (#21) with a fix.

@abecks abecks closed this as completed in #21 Jun 5, 2018
@abecks
Copy link
Owner

abecks commented Jun 5, 2018

Released as 3.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants