Sails.js 1.0打破了全新安装

时间:2017-10-28 17:40:35

标签: javascript node.js sails.js node-modules

使用Sails 1.0时没问题。当这个问题开始时,我没有在PC上安装或删除任何新东西。我也重新安装了Windows,但仍有同样的问题:

dvs@dvs-PC MINGW64 /d/
$ clear

dvs@dvs-PC MINGW64 /d/
$ node -v
v6.11.5

dvs@dvs-PC MINGW64 /d/
$ npm install sails@beta -g
C:\Users\dvs\AppData\Roaming\npm\sails -> C:\Users\dvs\AppData\Roaming\npm\node_modules\sails\bin\sails.js
C:\Users\dvs\AppData\Roaming\npm
`-- sails@1.0.0-38


dvs@dvs-PC MINGW64 /d/
$ sails new exampleproject
C:\Users\dvs\AppData\Roaming\npm\node_modules\sails\node_modules\machine\lib\private\help-build-machine.js:1237
    );//parley(…)
    ^

SyntaxError: Unexpected token )
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\dvs\AppData\Roaming\npm\node_modules\sails\node_modules\machine\lib\build.js:7:24)

dvs@dvs-PC MINGW64 /d/
$

1 个答案:

答案 0 :(得分:0)

@ t-st-os刚刚在嵌套依赖项中发布了一个修复程序。我本周早些时候在测试版中引入了Node 6 compatibility issue:/(抱歉!)

要在您的应用中选择此修复程序:

rm -rf node_modules
rm package-lock.json
npm install