insin / nwb

A toolkit for React, Preact, Inferno & vanilla JS apps, React libraries and other npm modules for the web, with no configuration (until you need it)
Other
5.57k stars 331 forks source link

Following react-component creation guide doesn't create node_modules #454

Closed r20 closed 6 years ago

r20 commented 6 years ago

This issue is a:

Versions: node -v v7.0.0 npm -v 5.8.0 nwb -v v0.21.5

Which modules are installed in your project? '--(empty)

I'm going through the "Developing React Components and Libraries with nwb" guide (https://github.com/insin/nwb/blob/master/docs/guides/ReactComponents.md#developing-react-components-and-libraries-with-nwb) npm install -g nwb nwb new react-component react-loading-button Answered configuration questions as described in the guide. cd react-loading-button/

The next part in the guide talks about the scripts. I tried npm start and got errors such as this: ERROR in ./demo/src/index.js Module not found: Error: Can't resolve 'react' in xxxxxxxxxx

I noticed that there was no node_modules directory. The guide says "The following directory structure will be created, with react and react-dom dependencies installed from npm into node_modules/", but that doesn't seem to work.

r20 commented 6 years ago

I updated node to v8.11.1 and npm to 6.0.0 and now it works.