dva创建应用报错
➜ dva-demo dva new user-dashboard2 /usr/local/opt/nvm/versions/node/v7.3.0/lib/node_modules/dva-cli/bin/dva-new Creating a new Dva app in /Users/fyh/WebstormProjects/dva-demo/user-dashboard2.
create .editorconfig
create .eslintrc
create .roadhogrc
create gitignore
create package.json
create src/index.css
create src/index.html
create src/index.js
create src/router.js
create src/assets/yay.jpg
create src/components/Example.js
create src/models/example.js
create src/routes/IndexPage.css
create src/routes/IndexPage.js
create src/services/example.js
create src/utils/request.js
rename gitignore -> .gitignore
run npm install
use npm: cnpm module.js:472 throw err; ^
Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at evalmachine.
Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at evalmachine.
Success! Created user-dashboard2 at /Users/fyh/WebstormProjects/dva-demo/user-dashboard2.
Inside that directory, you can run several commands:
- npm start: Starts the development server.
- npm run build: Bundles the app into dist for production.
- npm test: Run test.
We suggest that you begin by typing: cd /Users/fyh/WebstormProjects/dva-demo/user-dashboard2 npm start
Happy hacking! ➜ dva-demo
难以阅读,请参考以下文档调整下格式:
- https://segmentfault.com/markdown
- https://guides.github.com/features/mastering-markdown/
好像是 cnpm 没安装好,你直接用 cnpm install 一个模块会报错吗?
@sorrycc 谢谢。重新安装了cnpm,搞定😄
脚本提示明明使用的npm安装的,为啥用到了cnpm了。把cnpm卸载了,也可以。。 不明白。
F:\WebPro\dvapro>dva new dvatest C:\Users\Administrator\AppData\Roaming\npm\node_modules\dva-cli\bin\dva-new events.js:182 throw er; // Unhandled 'error' event ^
Error: spawn cmd ENOENT at exports._errnoException (util.js:1014:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:189:19) at onErrorNT (internal/child_process.js:366:16) at _combinedTickCallback (internal/process/next_tick.js:102:11) at process._tickCallback (internal/process/next_tick.js:161:9) at Function.Module.runMain (module.js:607:11) at startup (bootstrap_node.js:158:16) at bootstrap_node.js:575:3
创建项目报这个错 不知道是什么原因了
$ dva new demoapp --demo
/usr/local/lib/node_modules/dva-cli/bin/dva-new Creating a new Dva app in /project/demoapp.
create .editorconfig
create gitignore
create package.json
create public/index.html
create src/index.ejs
create src/index.js
create src/index.less
rename gitignore -> .gitignore
run npm install
use npm: tnpm 基于:dva-cli version 0.9.2 然后并没有生成.roadhogrc 文件。 网上也差不到资料。 不知道到底为什么?