SyntaxError: Unexpected identifier
See original GitHub issuevue-cli项目 平台:mac node:10.14.2
"scripts": {
"fix-memory-limit": "cross-env LIMIT=4096 increase-memory-limit",
"serve": "vue-cli-service serve",
}
$ npm run serve
> scfsweb@1.0.0 serve /Users/hfd/Documents/ms/gitlab/sc/fsweb/dev/
> vue-cli-service serve
/Users/hfd/Documents/ms/gitlab/sc/fsweb/dev/node_modules/@vue/cli-service/bin/vue-cli-service.js:5
const requiredVersion = require('../package.json').engines.node --max-old-space-size=4096
^^^
SyntaxError: Unexpected identifier
at new Script (vm.js:83:7)
at createScript (vm.js:267:10)
at Object.runInThisContext (vm.js:319:10)
at Module._compile (internal/modules/cjs/loader.js:686:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:734:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:776:12)
at executeUserCode (internal/bootstrap/node.js:342:17)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scfsweb@1.0.0 serve: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scfsweb@1.0.0 serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/hfd/.npm/_logs/2018-12-26T01_39_05_364Z-debug.log
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
SyntaxError: Unexpected identifier in JavaScript [Solved]
To solve the "Uncaught SyntaxError: Unexpected identifier" error, make sure you don't have any misspelled keywords, e.g. Let or Function instead of let...
Read more >Unexpected Identifier in Chrome's Javascript console
I got SyntaxError: Unexpected identifier error, for invalid order between async and static, static must come first.
Read more >How To Solve The Unexpected Identifier Error in JavaScript
How do you fix this Unexpected identifier error in your code? The simplest thing you can do to find a specific error like...
Read more >A Common Cause of "Uncaught syntax error - Techstacker
A Common Cause of "Uncaught syntax error: unexpected identifier" in JavaScript ... One of the most common reasons is that you're trying to...
Read more >How to Fix "Uncaught SyntaxError: Unexpected identifier" in ...
In most cases, it is just code that is not adhering to the JavaScript syntax rules or contains typos. Hopefully, this post has...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
最后找到这个文件删除掉了
--max-old-space-size=4096
rm -rf node_modules npm i