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 build !error #133

Closed
joodies opened this issue May 9, 2016 · 4 comments
Closed

npm run build !error #133

joodies opened this issue May 9, 2016 · 4 comments

Comments

@joodies
Copy link

joodies commented May 9, 2016

npm start is working, but i cant build it...

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\Program Files (x86)\nodejs\node.exe" "D:\Program Files (x86)\nodejs\node_mod
ules\npm\bin\npm-cli.js" "run" "lint"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! react-slingshot@3.0.1 lint: esw webpack.config.* src tools
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-slingshot@3.0.1 lint script 'esw webpack.config.* src tools'.
npm ERR! This is most likely a problem with the react-slingshot package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! esw webpack.config.* src tools
npm ERR! You can get their info via:
npm ERR! npm owner ls react-slingshot
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! E:..\react-slingshot\npm-debug.log

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "D:\Program Files (x86)\nodejs\node.exe" "D:\Program Files (x86)\nodejs\node_mod
ules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v4.2.4
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! react-slingshot@3.0.1 prebuild: npm run clean-dist && npm run build:html && npm run lint
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-slingshot@3.0.1 prebuild script 'npm run clean-dist && npm run build:ht
ml && npm run lint'.
npm ERR! This is most likely a problem with the react-slingshot package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run clean-dist && npm run build:html && npm run lint
npm ERR! You can get their info via:
npm ERR! npm owner ls react-slingshot
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! E:..\npm-debug.log

@coryhouse
Copy link
Owner

Questions:

  1. Does this work? npm run prebuild
  2. If 1 doesn't work, try changing the lint script to look like this: "lint": "node_modules/.bin/esw webpack.config.* src tools", and change the remove-dist script to: "remove-dist": "node_modules/.bin/rimraf ./dist",
  3. What OS?
  4. What command line?
  5. What Node and npm version?

@joodies
Copy link
Author

joodies commented May 10, 2016

Turns out to be webpack setting errors.

@joodies joodies closed this as completed May 10, 2016
@coryhouse
Copy link
Owner

@joodies I'm confused. Are you saying you had to change the Slingshot webpack configuration? What did you have to change?

@joodies
Copy link
Author

joodies commented May 10, 2016

The reason is:
import avatar from './images/avatar.jpg';
load image file failed in this way, have to change to
const avatar = require('./images/avatar.jpg');
and use url-loader.

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

No branches or pull requests

2 participants