Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

npm start fails in 2.9.0 #190

Closed
rnemec opened this issue Nov 13, 2017 · 8 comments
Closed

npm start fails in 2.9.0 #190

rnemec opened this issue Nov 13, 2017 · 8 comments

Comments

@rnemec
Copy link

rnemec commented Nov 13, 2017

Is this a bug report?

Yes.

Can you also reproduce the problem with npm 4.x?

Running on npm 5.
Cannot try 4.

Which terms did you search for in User Guide?

npm run start - it is well documented and has been working well.

Environment

  1. node -v: v8.9.1
  2. npm -v: 5.5.1
  3. npm ls react-scripts-ts (if you haven’t ejected):
[email protected] /Users/rnemec/Projects/xxxxxx
└── [email protected] 

Then, specify:

  1. Operating system: Mac OS X 10.11
  2. Browser and version (if relevant):

Steps to Reproduce

  1. Use react-scripts-ts 2.8.0
  2. npm start starts fine, opens browser, etc
  3. Upgrade to react-scripts-ts 2.9.0
  4. npm start fails (stack trace below)

Expected Behavior

npm start starts fine as before

Actual Behavior

Failed with stacktrace:

module.js:538
    throw err;
    ^

Error: Cannot find module 'react-dev-utils/ignoredFiles'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/rnemec/Projects/xxxxxx/node_modules/react-scripts-ts/config/webpackDevServer.config.js:13:22)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/rnemec/Projects/xxxxxx/node_modules/react-scripts-ts/scripts/start.js:40:31)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)

@bootstraponline
Copy link

git clone https://github.com/facebookincubator/create-react-app.git
cd create-react-app/packages/react-dev-utils
yarn
yarn link

cd my_app
yarn link "react-dev-utils"
yarn start

will be fixed in the next Facebook create-react-app release, we just rebased on their latest code.

@wmonk
Copy link
Owner

wmonk commented Nov 13, 2017

I have unpublished 2.9.0. Mistakenly I published the incorrect version on the facebook code. I will now republish 2.10.0 with the last publish from facebook 51ee648f2517d6e86ba8bcffdf9144ef8954b19e.

@rnemec
Copy link
Author

rnemec commented Nov 13, 2017

Thanks everybody - help in real-time. Impressive!

@changLiuUNSW
Copy link

@wmonk Has 2.10.0 been published ?

@rnemec
Copy link
Author

rnemec commented Nov 15, 2017

I believe the dependency react-dev-utils has not been published with the latest code yet, by the facebook team. So the rebase from CRA needs to be carefully selected. Right now, it's either wait for @wmonk to be comfortable what he is merging, or go with the @bootstraponline suggestion (link).

@bootstraponline , if you can rewrite your solution using npm only, some folks may appreciate it, I'd guess. It's no big deal, those who cannot do that by themselves, maybe should not use the link approach. 😉

@quantuminformation
Copy link

@changLiuUNSW 2.8 is still the publish version

@bootstraponline
Copy link

facebook/create-react-app@36cd35d#diff-0ed7fc71b70cf1d8c98f8fcabdd35f17 is the commit.

I think it's easier to wait for FB to publish a new https://www.npmjs.com/package/react-dev-utils before releasing create-react-app-typescript Ideally we'd have a small diff from upstream so creating another custom patch would increase the maintenance burden.

@wmonk
Copy link
Owner

wmonk commented Nov 22, 2017

Closing this, as it's no longer an error. Wainting to integrate latest fb changes again.

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

No branches or pull requests

5 participants