我无法在nuxt中启动新项目

时间:2019-04-28 06:25:40

标签: node.js npm nuxt.js

我需要开始一个新的Nuxt项目,但是我不能

我使用npm cache clean --force清除了缓存;

我删除了package-lock.jsonnode_modules

但结果相同

这是控制台中的错误

...

C:\laragon\www\estudio\auth-nuxt-nuevo\node_modules\@nuxt\utils\dist\utils.js:1752
      const match = asString.match(/^([^{(]+)=>\s*(.*)/s);
                                   ^

SyntaxError: Invalid regular expression flags
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:599:28)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\laragon\www\estudio\auth-nuxt-nuevo\node_modules\@nuxt\cli\dist\cli-chunk.js:15:15)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! auth-nuxt-nuevo@1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the auth-nuxt-nuevo@1.0.0 dev 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!     C:\Users\Edmundo Esquivel\AppData\Roaming\npm-cache\_logs\2019-04-28T05_51_02_885Z-debug.log

...

这是日志

1 个答案:

答案 0 :(得分:2)

这是nuxt 2.6.3中的错误。它仅在node8上发生,并将在下一个次要版本https://github.com/nuxt/nuxt.js/pull/5608

中修复

现在您可以降级nuxt版本或将节点版本更新为10。我建议更新节点