Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM run dist error #1

Closed
oknoorap opened this issue May 11, 2016 · 14 comments
Closed

NPM run dist error #1

oknoorap opened this issue May 11, 2016 · 14 comments
Labels

Comments

@oknoorap
Copy link

I got this error when trying to run npm run dist

> vue-color@0.0.3 dist /Users/tian/Kerja/git/btbldr/node_modules/vue-color
> webpack --progress --hide-modules --config  webpack.build.js && NODE_ENV=production webpack --progress --hide-modules --config  webpack.build.min.js

Hash: 4b712a995855341bcaf9  
Version: webpack 1.13.0
Time: 82ms
                  Asset     Size  Chunks             Chunk Names
    ./dist/vue-color.js  2.37 kB       0  [emitted]  vue-color
./dist/vue-color.js.map  2.73 kB       0  [emitted]  vue-color
Hash: e0e1d518934a14133eeb  
Version: webpack 1.13.0
Time: 89ms
                  Asset     Size  Chunks             Chunk Names
./dist/vue-color.min.js  2.24 kB       0  [emitted]  vue-color

ERROR in ./dist/vue-color.min.js from UglifyJs
Unexpected token: name (Compact) [./dist/vue-color.min.js:57,8]
@xiaokaike
Copy link
Owner

@oknoorap
npm & node version ?

@oknoorap
Copy link
Author

npm 2.14.20
node v4.4.0

@xiaokaike
Copy link
Owner

@oknoorap
try again? i don't have problem

 vue-color git:(master) ✗ npm run dist

> vue-color@0.0.3 dist /Users/xiaokai/xeme/vuejs/vue-color
> webpack --progress --hide-modules --config  webpack.build.js && NODE_ENV=production webpack --progress --hide-modules --config  webpack.build.min.js

Hash: af746c1539236f51a17c  
Version: webpack 1.13.0
Time: 13219ms
                  Asset    Size  Chunks             Chunk Names
    ./dist/vue-color.js  190 kB       0  [emitted]  vue-color
./dist/vue-color.js.map  273 kB       0  [emitted]  vue-color
Hash: af4fcd67dd5fe1a55792  
Version: webpack 1.13.0
Time: 13528ms
                  Asset     Size  Chunks             Chunk Names
./dist/vue-color.min.js  61.4 kB       0  [emitted]  vue-color
➜  vue-color git:(master) ✗ node -v
v4.4.0
➜  vue-color git:(master) ✗ npm -v
2.14.20

@oknoorap
Copy link
Author

Nothing happens, still got the same error, btw my uglifyjs version is

uglifyjs --version
uglify-js 2.6.2

I read somewhere uglify doesn't support babel 6 is that true? has this error related with babel6 + uglifyjs?

@oknoorap
Copy link
Author

asciicast

@xiaokaike
Copy link
Owner

xiaokaike commented May 11, 2016

try to update the devDependencies like this ?
joeeames/WebpackFundamentalsCourse#3

@oknoorap
Copy link
Author

which version works?

npm WARN peerDependencies The peer dependency babel-core@^5.0.0 included from babel-loader will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
^C
Tians-iMac:vue-color tian$ npm update
npm WARN unmet dependency /Users/tian/Kerja/git/btbldr/node_modules/vue-color/node_modules/babel-loader/node_modules/loader-utils requires object-assign@'^4.0.1' but will load
npm WARN unmet dependency /Users/tian/Kerja/git/btbldr/node_modules/vue-color/node_modules/babel-loader/node_modules/object-assign,
npm WARN unmet dependency which is version 3.0.0
npm WARN unmet dependency /Users/tian/Kerja/git/btbldr/node_modules/vue-color/node_modules/babel-preset-es2015/node_modules/babel-plugin-transform-regenerator requires babel-core@'^6.8.0' but will load
npm WARN unmet dependency /Users/tian/Kerja/git/btbldr/node_modules/vue-color/node_modules/babel-core,
npm WARN unmet dependency which is version 5.8.38
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "update"
npm ERR! node v4.4.0
npm ERR! npm  v2.14.20
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package babel-loader@5.4.0 does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer vue-loader@7.5.3 wants babel-loader@^6.1.0

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tian/Kerja/git/btbldr/node_modules/vue-color/npm-debug.log```


I'll update this issue tomorrow..

@xiaokaike
Copy link
Owner

i install uglifyjs too, but also without problem

what is your webpack version ?

@oknoorap
Copy link
Author

my webpack version 1.13.0

@xiaokaike
Copy link
Owner

the same as me T.T

@oknoorap
Copy link
Author

when I remove this line from webpack.config.js, the first answer from
Stackoverflow

exclude: /node_modules|vue\/src|vue-router\/|vue-loader\/|vue-hot-reload-api\//

it's success, but still the output have errors

@cassioscabral
Copy link
Collaborator

I tried on Windows and worked fine. I had to change the NODE_ENV=production to SET "NODE_ENV=production" inside the package.json though. On windows the NODE_ENV doesn't work.

Node: 4.4.3
npm: 2.15.1

Could you try to use npm cache clean and if this doesn't succeed, try to remove the node_modules folder and try again(install and dist).

@gnclmorais
Copy link
Contributor

Is this still a thing? I don’t see any dist formula on package.json

@cassioscabral
Copy link
Collaborator

I don't think so, it should be closed imo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants