Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

npm start failed after installing #64

Closed
nb256 opened this issue Aug 23, 2017 · 25 comments
Closed

npm start failed after installing #64

nb256 opened this issue Aug 23, 2017 · 25 comments

Comments

@nb256
Copy link

nb256 commented Aug 23, 2017

I installed reactql globally and started a project using 'reactql new' command. I thought I better to post this error if it is an unexpected on executing the command 'npm start':

webpack: Failed to compile.
C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:1955
throw new Error("Module build failed: Error: ENOENT: no such file or directory, scandir 'C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\vendor'\n at Object.fs.readdirSync (fs.js:910:18)\n at Object.getInstalledBinaries (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\extensions.js:124:13)\n at foundBinariesList (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\errors.js:20:15)\n at foundBinaries (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\errors.js:15:5)\n at Object.module.exports.missingBinary (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\errors.js:45:5)\n at module.exports (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\binding.js:15:30)\n at Object. (C:\Users\Naim\Documents\projects
Error: Module build failed: Error: ENOENT: no such file or directory, scandir 'C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\vendor'
at Object.fs.readdirSync (fs.js:910:18)
at Object.getInstalledBinaries (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\extensions.js:124:13)
at foundBinariesList (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\binding.js:15:30)
at Object. (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (module.js:569:30)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\babel-register\lib\node.js:152:7)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object. (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\sass-loader\lib\loader.js:3:14)
at Module._compile (module.js:569:30)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\babel-register\lib\node.js:152:7)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at loadLoader (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\loader-runner\lib\loadLoader.js:13:17)
at iteratePitchingLoaders (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
at iteratePitchingLoaders (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
at C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\loader-runner\lib\LoaderRunner.js:173:18
at loadLoader (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\loader-runner\lib\loadLoader.js:36:3)
at iteratePitchingLoaders (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\loader-runner\lib\LoaderRunner.js:169:2)
at Object.defineProperty.value (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:1955:7)
at webpack_require (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:20:30)
at Object.defineProperty.value (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:1909:14)
at webpack_require (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:20:30)
at Object.defineProperty.value (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:1402:14)
at webpack_require (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:20:30)
at Object.defineProperty.value (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:1184:13)
at webpack_require (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:20:30)
at Object. (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:721:12)
at webpack_require (C:\Users\Naim\Documents\projects\deneme-reactql\dist\server_dev.js:20:30)

Error on the browser:

Failed to compile.
(undefined) C:/Users/Naim/Documents/projects/deneme-reactql/node_modules/css-loader?{"minimize":false,"localIdentName":"[local]-[hash:base64]","importLoaders":1,"sourceMap":true,"modules":true}!C:/Users/Naim/Documents/projects/deneme-reactql/node_modules/postcss-loader/lib?{"sourceMap":true}!C:/Users/Naim/Documents/projects/deneme-reactql/node_modules/resolve-url-loader!C:/Users/Naim/Documents/projects/deneme-reactql/node_modules/sass-loader/lib/loader.js?{"sourceMap":true}!C:/Users/Naim/Documents/projects/deneme-reactql/src/components/stats.scss
Module build failed: Error: ENOENT: no such file or directory, scandir 'C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\vendor'
at Object.fs.readdirSync (fs.js:910:18)
at Object.getInstalledBinaries (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\extensions.js:124:13)
at foundBinariesList (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\errors.js:20:15)
at foundBinaries (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\errors.js:15:5)
at Object.module.exports.missingBinary (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\errors.js:45:5)
at module.exports (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\binding.js:15:30)
at Object. (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (module.js:569:30)
at Module._extensions..js (module.js:580:10)
at Object.require.extensions.(anonymous function) [as .js] (C:\Users\Naim\Documents\projects\deneme-reactql\node_modules\babel-register\lib\node.js:152:7)
@ C:/Users/Naim/Documents/projects/deneme-reactql/src/components/stats.scss 4:14-247 18:2-22:4 19:20-253
@ C:/Users/Naim/Documents/projects/deneme-reactql/src/components/stats.js
@ C:/Users/Naim/Documents/projects/deneme-reactql/src/components/main/index.js
@ C:/Users/Naim/Documents/projects/deneme-reactql/src/app.js
@ C:/Users/Naim/Documents/projects/deneme-reactql/kit/entry/browser.js
@ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server react-hot-loader/patch webpack-dev-server/client?http://localhost:8080 webpack/hot/only-dev-server C:/Users/Naim/Documents/projects/deneme-reactql/kit/entry/browser.js

@darkestblue91
Copy link

Hi,

Yeah, i have the same problem, my console and browser are throwing exactly same errors.

Using Node 8.4.0, maybe it needs an old version of something like that.

@leebenson
Copy link
Owner

I'm using 8.4 locally on a Mac, so it's not the version of Node.

@darkestblue91 - are you also using Windows?

@leebenson
Copy link
Owner

Try deleting node_modules and package-lock.json in your ReactQL project dir, a re-running npm i to see if rebuilding the node-sass binaries helps. I'm not able to replicate the issue on macOS High Sierra with Node 8.4.0... thinking maybe this is a Windows thing.

@Nhiokh
Copy link

Nhiokh commented Aug 24, 2017

Exactly the same error here. Same windows OS.

@leebenson
Copy link
Owner

Ok, seems like an issue with Windows then. Did deleting node_modules and package-lock.json in your ReactQL project dir do anything?

I'll try to get some time later to test this locally on Windows 10.

@Nhiokh
Copy link

Nhiokh commented Aug 24, 2017

I tried and it didn't do anyting. Even tried to reinstall everything from the bottom up (node & reactql).

@leebenson
Copy link
Owner

Might be related to sass/node-sass#1579

@leebenson
Copy link
Owner

Does npm rebuild node-sass solve it?

@Nhiokh
Copy link

Nhiokh commented Aug 24, 2017

It worked. Does this mean node-sass should be rebuilt everytime (sorry, noobz here)?

Ps: Is it me or does sass seems a little broken on node lately...?

@leebenson
Copy link
Owner

leebenson commented Aug 24, 2017

Seems like a long-running issue. Someone asked the same at sass/node-sass#1387 (comment) in May, without a response -- the original thread goes back to Feb 2016.

This would probably fix it (or some variant in the CLI that detects if we're running on Windows, and does a defensive rebuild), but it's a little heavy-handed because that would essentially mean building it twice for every new project, on systems where it worked the first time.

Once the binaries have been fixed, it should (in theory) be fine for subsequent ReactQL projects. Give it a shot. Start a second one with reactql new and see if it works.

@Nhiokh
Copy link

Nhiokh commented Aug 24, 2017

Started a second reactql project and the error reoccured. I'm trying now to rebuild node-sass again.

edit: after the node-sass rebuild, everything is clear again. So that means rebuilding node-sass everytime we build a new project is mandatory it seems... :(

@leebenson
Copy link
Owner

Ok, so probably time for the CLI to take care of this. Re-opening.

@leebenson leebenson reopened this Aug 24, 2017
@Nhiokh
Copy link

Nhiokh commented Aug 24, 2017

Here to help if needed :)

@leebenson
Copy link
Owner

Fixed 4.5.2. Run npm i -g reactql to grab the latest. Would appreciate if you could test locally and let me know if it works for you.

@nb256
Copy link
Author

nb256 commented Aug 25, 2017

It worked without typing npm rebuild node-sass

@leebenson
Copy link
Owner

Awesome, thanks @nb256 😄

@Nhiokh
Copy link

Nhiokh commented Aug 25, 2017

Tried to run npm i -g reactql but I'm still on 4.5.1. Is it normal ?

Edit: tried numerous times via npm and yarn and still got this when I ask reactql version :

C:\Users\Samuel\Desktop>reactql version
4.5.1
┌──────────────────────────────────────────────────┐
│ │
│ ReactQL CLI update available: 4.5.1 -> 4.5.2 │
│ │
│ Run npm i -g reactql to upgrade. │
│ │
└──────────────────────────────────────────────────┘

@leebenson
Copy link
Owner

@Nhiokh - try again. You can see the latest package at https://www.npmjs.com/package/reactql is 4.5.2. Could be that you were hitting a cache.

You can also try reactql version, which should alert you that a new version is available

@Nhiokh
Copy link

Nhiokh commented Aug 25, 2017

What would be the way to dump my cache?

@leebenson
Copy link
Owner

@Nhiokh - can you install a specific version?

e.g.

npm i -g reactql@4.5.2

@Nhiokh
Copy link

Nhiokh commented Aug 25, 2017

Uh........

C:\Users\Samuel\Desktop>npm i -g reactql@4.5.2
C:\Users\Samuel\AppData\Roaming\npm\reactql -> C:\Users\Samuel\AppData\Roaming\npm\node_modules\reactql\bin\reactql

reactql@4.5.2 postinstall C:\Users\Samuel\AppData\Roaming\npm\node_modules\reactql
node cli/postinstall

================================================================================

██████╗ ███████╗ █████╗ ██████╗████████╗ ██████╗ ██╗
██╔══██╗██╔════╝██╔══██╗██╔════╝╚══██╔══╝██╔═══██╗██║
██████╔╝█████╗ ███████║██║ ██║ ██║ ██║██║ v4.5.2
██╔══██╗██╔══╝ ██╔══██║██║ ██║ ██║▄▄ ██║██║
██║ ██║███████╗██║ ██║╚██████╗ ██║ ╚██████╔╝███████╗

Usage:

Start a new ReactQL project
reactql new [options]

Show help / all options
reactql help

Show the current version / check for latest version:
reactql version

Follow us on 🐦 Twitter for news/updates:
https://twitter.com/reactql

================================================================================

  • reactql@4.5.2
    updated 1 package in 7.935s

C:\Users\Samuel\Desktop>reactql version
4.5.1
┌──────────────────────────────────────────────────┐
│ │
│ ReactQL CLI update available: 4.5.1 -> 4.5.2 │
│ │
│ Run npm i -g reactql to upgrade. │
│ │
└──────────────────────────────────────────────────┘

@Nhiokh
Copy link

Nhiokh commented Aug 25, 2017

Would it be possible for the version message alone to not be updated?

@leebenson
Copy link
Owner

leebenson commented Aug 25, 2017

No, that shouldn't happen - both the initial postinstall message and the subsequent reactql version pull from the same package.json to get the version number.

It seems like you have an existing reactql global installation that's not being overwritten when you install over it.

What does:

C:\Users\Samuel\AppData\Roaming\npm\node_modules\reactql\bin\reactql version

... show?

@Nhiokh
Copy link

Nhiokh commented Aug 25, 2017

Weird thing was everything in the package.json refers to 4.5.2 so I definetly got no idea why node shows me 4.5.1...

But anyway, I searched every reactql file in my computer, deleted the whole bunch, reinstalled it, and now it's all clear.

@leebenson
Copy link
Owner

Glad it's sorted @Nhiokh.

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

4 participants