Vue.js devtools 3.0.8版本npm run dev 报错build的时候报错怎么解决

匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。123456789101112131415161718192021222324252627282930313233343536373839404142434445464748490 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli & 'C:\\Program Files\\nodejs\\node_global\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli & 'run',
1 verbose cli & 'build' ]
2 info using npm@3.10.2
3 info using node@v4.4.7
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle vue-fast@1.0.0~prebuild: vue-fast@1.0.0
6 silly lifecycle vue-fast@1.0.0~prebuild: no script for prebuild, continuing
7 info lifecycle vue-fast@1.0.0~build: vue-fast@1.0.0
8 verbose lifecycle vue-fast@1.0.0~build: unsafe-perm in lifecycle true
9 verbose lifecycle vue-fast@1.0.0~build: PATH: C:\Program Files\nodejs\node_global\node_modules\npm\bin\node-gyp-Z:\minqing\static\pyyx\app\h5\node_modules\.C:\Program Files\C:\Windows\system32;C:\WC:\Windows\System32\WC:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;C:\Program Files (x86)\C:\Users\yx027\AppData\Roaming\npm
10 verbose lifecycle vue-fast@1.0.0~build: CWD: Z:\minqing\static\pyyx\app\h5
11 silly lifecycle vue-fast@1.0.0~build: Args: [ '/d /s /c',
11 silly lifecycle & 'export NODE_ENV=production && webpack --progress --hide-modules' ]
12 silly lifecycle vue-fast@1.0.0~build: Returned: code: 1 &signal: null
13 info lifecycle vue-fast@1.0.0~build: Failed to exec build script
14 verbose stack Error: vue-fast@1.0.0 build: `export NODE_ENV=production && webpack --progress --hide-modules`
14 verbose stack Exit status 1
14 verbose stack & & at EventEmitter.&anonymous& (C:\Program Files\nodejs\node_global\node_modules\npm\lib\utils\lifecycle.js:242:16)
14 verbose stack & & at emitTwo (events.js:87:13)
14 verbose stack & & at EventEmitter.emit (events.js:172:7)
14 verbose stack & & at ChildProcess.&anonymous& (C:\Program Files\nodejs\node_global\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack & & at emitTwo (events.js:87:13)
14 verbose stack & & at ChildProcess.emit (events.js:172:7)
14 verbose stack & & at maybeClose (internal/child_process.js:827:16)
14 verbose stack & & at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid vue-fast@1.0.0
16 verbose cwd Z:\minqing\static\pyyx\app\h5
17 error Windows_NT 6.1.7601
18 error argv &C:\\Program Files\\nodejs\\node.exe& &C:\\Program Files\\nodejs\\node_global\\node_modules\\npm\\bin\\npm-cli.js& &run& &build&
19 error node v4.4.7
20 error npm &v3.10.2
21 error code ELIFECYCLE
22 error vue-fast@1.0.0 build: `export NODE_ENV=production && webpack --progress --hide-modules`
22 error Exit status 1
23 error Failed at the vue-fast@1.0.0 build script 'export NODE_ENV=production && webpack --progress --hide-modules'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the vue-fast package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error & & export NODE_ENV=production && webpack --progress --hide-modules
23 error You can get information on how to open an issue for this project with:
23 error & & npm bugs vue-fast
23 error Or if that isn't available, you can get their info via:
23 error & & npm owner ls vue-fast
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
12345678910111213141516171819202122232425262728293031323334{
& &name&: &vue-fast&,
& &version&: &1.0.0&,
& &description&: &quick build vue&,
& &main&: &bundle.js&,
& &scripts&: {
& & &dev&: &export NODE_ENV=development && webpack-dev-server --host=127.0.0.1 --port 7777 --inline --hot --quiet&,
& & &build&: &export NODE_ENV=production && webpack --progress --hide-modules&
& &author&: &oct16&,
& &license&: &MIT&,
& &devDependencies&: {
& & &babel&: &^6.5.2&,
& & &babel-loader&: &^6.2.3&,
& & &babel-plugin-transform-runtime&: &^6.5.2&,
& & &babel-preset-es2015&: &^6.5.0&,
& & &babel-preset-stage-0&: &^6.5.0&,
& & &babel-runtime&: &^6.5.0&,
& & &css-loader&: &^0.23.1&,
& & &extract-text-webpack-plugin&: &^1.0.1&,
& & &less&: &^2.7.1&,
& & &less-loader&: &^2.2.3&,
& & &style-loader&: &^0.13.1&,
& & &vue&: &^1.0.24&,
& & &vue-hot-reload-api&: &^1.3.2&,
& & &vue-html-loader&: &^1.2.2&,
& & &vue-loader&: &^8.5.2&,
& & &vue-resource&: &^0.7.4&,
& & &vue-router&: &^0.7.13&,
& & &vue-style-loader&: &^1.0.0&,
& & &webpack&: &^1.13.1&,
& & &webpack-dev-server&: &^1.14.1&
1&export NODE_ENV=production && webpack --progress --hide-modules&
这是 linux 下设置环境变量的方法。看来作者已经不管 windows 了,在 windows 下开发就要时不时忍受被人嫌弃的痛苦。
早不用 windows 了,不过大概还记得设置环境变量的方法。你把所有的
或者参考 @wusisu ,使用一个类 linux 的终端
本文出自操他妈,转载时请注明出处及相应链接。
本文永久链接: /42305.html
Ɣ回顶部一开始可以,现在npm run dev报错
自己理一下顺序。。。原本一开始是可以的,然后突然不知道为什么打开之后不显示了,看了一下有报错,求解??PS:中文报错是火狐浏览器,英文报错是谷歌浏览器
我把之前的删掉重新安装过一遍了,但是还是不行,还是不出现页面报错,Unexpected token import,到底是什么原因呢。。。我用的是webstorm
你用的是vue-cli默认生成的项目吧,npm install 安装成功了吗,确保所有的依赖安装成功,网络问题用cnpm,具体办法看我之前回答。
import 未找到,可能是babel在解析es6语法的时候出错,或者babel安装的时候有问题,理论上vue-cli默认的程序不会有问题,怀疑你是网络问题,导致部分依赖没安装成功,然后import这种es6语法就没有被转化成es5.
cnpm install
√ All packages installed (used 1s, speed 0B/s, json 0(0B), tarball 0B)
点击展开后面1条评论
写下你的评论...
写下你的评论...
写下你的评论...
端口要怎么改?如果我不想改端口,就想用这个8080的话我要怎么做呢?
我改端口号了,端口的没问题,现在就是上面的浏览器会报错
谷歌是:Unexpected token import
火狐是:import declarations may only appear at top level of a module
帮忙看看是什么问题
有木有改过vue脚手架中的代码,如果改过看看import用的对不对
点击展开后面1条评论
写下你的评论...
Copyright (C)
All Rights Reserved | 京ICP备 号-2推荐这篇日记的豆列
&&&&&&&&&&&&

我要回帖

更多关于 vue npm run dev 报错 的文章

 

随机推荐