1

I ran into problem when i want to setup project of react-boilerplate from tutorial: http://facebook.github.io/flux/docs/todo-list.html#content

When i run npm install it install all modules, but when i use command npm run build as tutorial says i get this kind of error:

C:\Users\Andraz\Desktop\react-boilerplate>npm run build

> todomvc-flux@0.0.3 build C:\Users\Andraz\Desktop\react-boilerplate
> browserify . -t [envify --NODE_ENV production] | uglifyjs -cm > js/bundle.min.js

The system cannot find the path specified.
Error: Cannot find module 'C:\Users\Andraz\Desktop\react-boilerplate' from 'C:\Users\Andraz\Desktop\react-boilerplate'
at C:\Users\Andraz\Desktop\react-boilerplate\node_modules\browserify\node_modules\browser-resolve\node_modules\resolve\lib\async.js:55:21
at load (C:\Users\Andraz\Desktop\react-boilerplate\node_modules\browserify\node_modules\browser-resolve\node_modules\resolve\lib\async.js:69:43)
at onex (C:\Users\Andraz\Desktop\react-boilerplate\node_modules\browserify\node_modules\browser-resolve\node_modules\resolve\lib\async.js:92:31)
at C:\Users\Andraz\Desktop\react-boilerplate\node_modules\browserify\node_modules\browser-resolve\node_modules\resolve\lib\async.js:22:47
at FSReqWrap.oncomplete (fs.js:95:15)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v0.12.3
npm ERR! npm  v2.9.1
npm ERR! code ELIFECYCLE
npm ERR! todomvc-flux@0.0.3 build: `browserify . -t [envify --NODE_ENV  production] | uglifyjs -cm > js/bundle.min.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todomvc-flux@0.0.3 build script 'browserify . -t [envify --NODE_ENV production] | uglifyjs -cm > js/bundle.min.js'.
npm ERR! This is most likely a problem with the todomvc-flux package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     browserify . -t [envify --NODE_ENV production] | uglifyjs -cm > js/bundle.min.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls todomvc-flux
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Andraz\Desktop\react-boilerplate\npm-debug.log

I use Win7. What could i be doing wrong?

zazmaister
  • 667
  • 1
  • 7
  • 10

1 Answers1

3

I encountered this same issue.

You likely copied the package.json from the github repo as the tutorial directs.

If you examine the package.json tasks, you'll see that it references bundle.js and app.js both in the js/ directory.

Create this directory in the root project (same directory as package.json) and non run build will now complete.

The tutorial makes it sound as if it will describe all steps you need to make when starting with react-bootstrap but it does not. It's more of a broad strokes summary.

Matt Rkiouak
  • 141
  • 7
  • how to create bundle.js or where can i find it? sry i am a little green here – zazmaister Aug 04 '15 at 22:49
  • 1
    @zazmaister Just create an empty text file, e.g. If windows from a command prompt 'notepad bundle.js' and save. Alternatively you can copy the bundle.js from the repo and save that. Either one, after the js/ directory exists and contains a file called bundle.js and app.js (empty even), 'npm run build' will complete without error. For full functionality the files will need to match the repo. – Matt Rkiouak Aug 05 '15 at 01:08
  • it throws me: WARN: Condition always false [-:1434,6] WARN: Dropping unreachable code [-:1435,4] and then i try to npm start and nothing happens – zazmaister Aug 05 '15 at 09:11
  • The warning is expected, and after npm start, assuming you've copied package.json, browserify and watch iffy are running. Please accept the answer as you are no longer receiving your question's original error. You can create a new question if you are having trouble with a new issue. – Matt Rkiouak Aug 05 '15 at 11:54