我按照eletrode的快速入门指南进行操作 (http://www.electrode.io/docs/what_is_electrode.html)。在运行命令npm install时我得到以下错误。试过多个选项来解决它。但无法取得成功。如果有人有解决方案,请告诉我。 谢谢你的时间和感谢你的帮助。
错误代码在下面提到&我正在使用ubunut 16.04&节点版本8.9.1
electrode-archetype-opt-inferno@0.2.2 preinstall /media/prince/New Volume/tutorial/tutorial_project/test/myapp/node_modules/electrode-archetype-react-app-dev/node_modules/electrode-archetype-opt-inferno
> node optional-check.js
electrode-archetype-opt-inferno: no archetype config found - skipping install
> electrode-archetype-opt-inferno@0.1.1 preinstall /media/prince/New Volume/tutorial/tutorial_project/test/myapp/node_modules/electrode-archetype-opt-inferno
> node optional-check.js
electrode-archetype-opt-inferno: no archetype config found - skipping install
> electrode-archetype-opt-inferno@0.2.2 preinstall /media/prince/New Volume/tutorial/tutorial_project/test/myapp/node_modules/electrode-archetype-react-app/node_modules/electrode-archetype-opt-inferno
> node optional-check.js
electrode-archetype-opt-inferno: no archetype config found - skipping install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electrode-archetype-opt-inferno@0.2.2 (node_modules/electrode-archetype-react-app-dev/node_modules/electrode-archetype-opt-inferno):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electrode-archetype-opt-inferno@0.2.2 preinstall: `node optional-check.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electrode-archetype-opt-inferno@0.1.1 (node_modules/electrode-archetype-opt-inferno):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electrode-archetype-opt-inferno@0.1.1 preinstall: `node optional-check.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electrode-archetype-opt-inferno@0.2.2 (node_modules/electrode-archetype-react-app/node_modules/electrode-archetype-opt-inferno):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electrode-archetype-opt-inferno@0.2.2 preinstall: `node optional-check.js`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
up to date in 21.423s
$ clap dev
[15:33:43] xclap version 0.2.21 at CWD/node_modules/xclap
[15:33:43] NodeJS version v9.4.0 at /usr/local/bin/node
[15:33:43] CWD is /media/prince/New Volume/tutorial/tutorial_project/test/app2
[15:33:43] Loaded CWD/xclap.js
[15:33:43] Added CWD/~/.bin to PATH
[15:33:43] Process dev's dependency serial array [".remove-log-files",".development-env",".clean.build",".mk-dist-dir"]
[15:33:43] -Execute electrode/.remove-log-files as function
[15:33:43] >Done Execute electrode/.remove-log-files as function (1 ms)
[15:33:43] .Execute electrode/.development-env as function
[15:33:43] >Done Execute electrode/.development-env as function (0 ms)
[15:33:43] -Process electrode/.clean.build serial array [".clean.dist",".clean.dll"]
[15:33:43] ..Execute electrode/.clean.dist as function
[15:33:43] >>Done Execute electrode/.clean.dist as function (5 ms)
[15:33:43] --Execute electrode/.clean.dll as function
[15:33:43] >>Done Execute electrode/.clean.dll as function (0 ms)
[15:33:43] >Done Process electrode/.clean.build serial array [".clean.dist",".clean.dll"] (9 ms)
[15:33:43] .Execute electrode/.mk-dist-dir as function
[15:33:43] >Done Execute electrode/.mk-dist-dir as function (2 ms)
[15:33:43] Done Process dev's dependency serial array [".remove-log-files",".development-env",".clean.build",".mk-dist-dir"] (15 ms)
[15:33:43] Process electrode/dev serial array [".webpack-dev",["wds.dev","server-watch","generate-service-worker"]]
[15:33:43] .Execute electrode/.webpack-dev as function
[15:33:43] >Done Execute electrode/.webpack-dev as function (0 ms)
[15:33:43] -Process electrode/dev.S concurrent array ["wds.dev","server-watch","generate-service-worker"]
[15:33:43] ..Execute electrode/wds.dev webpack-dev-server --watch --watch-aggregate-timeout 2000 --config CWD/~/electrode-archetype-react-app-dev/config/webpack/webpack.config.dev.js --progress --colors --port 2992 --host localhost
[15:33:43] --Execute electrode/generate-service-worker as function
[15:33:43] ..Process server-watch's dependency serial array [".init-bundle.valid.log"]
[15:33:43] >>Done Execute electrode/generate-service-worker as function (2 ms)
[15:33:43] ---Execute electrode/.init-bundle.valid.log as function
[15:33:43] >>>Done Execute electrode/.init-bundle.valid.log as function (1 ms)
[15:33:43] >>Done Process server-watch's dependency serial array [".init-bundle.valid.log"] (3 ms)
[15:33:43] ..Execute electrode/server-watch as function
[nodemon] 1.17.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: .etmp/bundle.valid.log /media/prince/New Volume/tutorial/tutorial_project/test/app2/src/server/**/* /media/prince/New Volume/tutorial/tutorial_project/test/app2/config/**/*
info: APP_SRC_DIR set to src/
module.js:557
throw err;
^
Error: Cannot find module '/media/prince/New'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at requireConfig (/media/prince/New Volume/tutorial/tutorial_project/test/app2/node_modules/webpack/bin/convert-argv.js:97:18)
at /media/prince/New Volume/tutorial/tutorial_project/test/app2/node_modules/webpack/bin/convert-argv.js:104:17
at Array.forEach (<anonymous>)
at module.exports (/media/prince/New Volume/tutorial/tutorial_project/test/app2/node_modules/webpack/bin/convert-argv.js:102:15)
at Object.<anonymous> (/media/prince/New Volume/tutorial/tutorial_project/test/app2/node_modules/webpack-dev-server/bin/webpack-dev-server.js:223:50)
at Module._compile (module.js:660:30)
[15:33:46] >>Failed Execute electrode/wds.dev webpack-dev-server --watch --watch-aggregate-timeout 2000 --config CWD/~/electrode-archetype-react-app-dev/config/webpack/webpack.config.dev.js --progress --colors --port 2992 --host localhost (2.63 sec)
[15:33:46] >>Done Execute electrode/server-watch as function (2.62 sec)
[15:33:46] >Done Process electrode/dev.S concurrent array ["wds.dev","server-watch","generate-service-worker"] (2.63 sec)
[15:33:46] Done Process electrode/dev serial array [".webpack-dev",["wds.dev","server-watch","generate-service-worker"]] (2.63 sec)
Execution Failed - Errors:
1 shell cmd 'webpack-dev-server --watch --watch-aggregate-timeout 2000 --config /media/prince/New Volume/tutorial/tutorial_project/test/app2/node_modules/electrode-archetype-react-app-dev/config/webpack/webpack.config.dev.js --progress --colors --port 2992 --host localhost' exit code 1
答案 0 :(得分:1)
我遇到了这个问题,花了两天时间来解决它。 我的解决方案来了
请不要在github中为jchip提到的带空格的文件和目录命名。 (https://github.com/electrode-io/electrode/issues/737#issuecomment-369421380)
我使用的解决方案命令
sudo nvm install 8.9.1
nvm使用v8.9.1
sudo npm install -g electrode-ignite
sudo npm install -g yarn
ingnite
clap dev