我使用角度2设置开发风帆应用程序,但我在
中出错SyntaxError: /home/mts/Desktop/sampleProject/appSails/node_modules/angular2/ts/package.json: Unexpected token <
at Object.parse (native)
at Object.Module._extensions..json (module.js:430:27)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at /usr/local/lib/node_modules/sails/node_modules/include-all/index.js:129:29
at Array.forEach (native)
at requireAll (/usr/local/lib/node_modules/sails/node_modules/include-all/index.js:44:9)
at /usr/local/lib/node_modules/sails/node_modules/include-all/index.js:54:23
如何解决如何启动sails服务器的场景?
答案 0 :(得分:0)
你的问题(也是我的问题)是angular2是一个客户端软件包,名为incluede-all
的软件包试图在sails目录中包含所有node_module
个文件。我通过向 package.json
"clientsideDependencies": [
"angular2","zone.js","rxjs"
],
然后我分叉include-all
包并编写一个代码来传递这个包
这是我的fork
您可以使用此分支,只需将include-all
的来源package.json
更改为:
"include-all": "https://github.com/semirturgay/include-all.git"
然后运行npm install
更新include-all