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

你的代码里面没有使用严格模式 #18

Open
342708096 opened this issue Sep 28, 2017 · 2 comments
Open

你的代码里面没有使用严格模式 #18

342708096 opened this issue Sep 28, 2017 · 2 comments

Comments

@342708096
Copy link

你的代码里面没有添加'use strict';这将导致在低版本的nodejs里面运行报错.能不能加上.
ERROR in ./projects/iphone8/tpl/award-list.tpl
Module build failed: SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:54:16)
at Module._compile (module.js:375:25)
at Object.Module._extensions..js (module.js:406:10)
at Module.load (module.js:345:32)
at Function.Module._load (module.js:302:12)
at Module.require (module.js:355:17)
at require (internal/module.js:13:17)
at loadLoader (/Users/zhuzheng/projects/activity-vue/node_modules/loader-runner/lib/loadLoader.js:13:17)
at iteratePitchingLoaders (/Users/zhuzheng/projects/activity-vue/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
at iteratePitchingLoaders (/Users/zhuzheng/projects/activity-vue/node_modules/loader-runner/lib/LoaderRunner.js:165:10)
at /Users/zhuzheng/projects/activity-vue/node_modules/loader-runner/lib/LoaderRunner.js:173:18
at loadLoader (/Users/zhuzheng/projects/activity-vue/node_modules/loader-runner/lib/loadLoader.js:36:3)
at iteratePitchingLoaders (/Users/zhuzheng/projects/activity-vue/node_modules/loader-runner/lib/LoaderRunner.js:169:2)
at runLoaders (/Users/zhuzheng/projects/activity-vue/node_modules/loader-runner/lib/LoaderRunner.js:362:2)
at NormalModule.doBuild (/Users/zhuzheng/projects/activity-vue/node_modules/webpack/lib/NormalModule.js:179:3)
at NormalModule.build (/Users/zhuzheng/projects/activity-vue/node_modules/webpack/lib/NormalModule.js:268:15)
at Compilation.buildModule (/Users/zhuzheng/projects/activity-vue/node_modules/webpack/lib/Compilation.js:146:10)
at factoryCallback (/Users/zhuzheng/projects/activity-vue/node_modules/webpack/lib/Compilation.js:329:11)
at /Users/zhuzheng/projects/activity-vue/node_modules/webpack/lib/NormalModuleFactory.js:253:5
at /Users/zhuzheng/projects/activity-vue/node_modules/webpack/lib/NormalModuleFactory.js:99:14
at /Users/zhuzheng/projects/activity-vue/node_modules/tapable/lib/Tapable.js:268:11
at NormalModuleFactory. (/Users/zhuzheng/projects/activity-vue/node_modules/webpack/lib/CompatibilityPlugin.js:52:5)
@ ./projects/iphone8/js/UI/WinnerList.js 10:0-52
@ ./projects/iphone8/js/iphone8.js
@ multi ./projects/iphone8/js/iphone8.js

@aui
Copy link
Collaborator

aui commented Sep 28, 2017

你的 node 版本是多少?

@342708096
Copy link
Author

v5.2.0

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

2 participants