generator-jhipster: Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, scandir '**\node_modules\node-sass\vendor'

Hi, There was an error occured in my chrome on windows 10 x64 when I run yarn start successfully.

Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, scandir 'H:\playground\angular\manager-demo\node_modules\node-sass\vendor' at Object.fs.readdirSync (fs.js:909:18) at Object.getInstalledBinaries (H:\playground\angular\manager-demo\node_modules\node-sass\lib\extensions.js:124:13) but the folder vendor and the binary file binding.node did exist.

steps to reproduce the error

just follow the JHipster Quick Start and choose sass configuration yarn start

JHipster Version(s)

JHipster version: 4.5.6

JHipster Version(s)
mlmanager@0.0.0 H:\playground\angular\manager-demo
`-- generator-jhipster@4.5.6

JHipster configuration, a .yo-rc.json file generated in the root folder
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.memorieslab.manager",
      "nativeLanguage": "zh-cn"
    },
    "jhipsterVersion": "4.5.6",
    "baseName": "mlmanager",
    "packageName": "com.memorieslab.manager",
    "packageFolder": "com/memorieslab/manager",
    "serverPort": "8080",
    "authenticationType": "session",
    "hibernateCache": "ehcache",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "rememberMeKey": "b058ca73a674ccd847332b604534c0fcaa35b68a",
    "clientFramework": "angular2",
    "useSass": true,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "zh-cn",
    "languages": [
      "zh-cn",
      "zh-tw",
      "en",
      "fr"
    ]
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory

ls: no such file or directory: .jhipster/*.json

Browsers and Operating System

java version “1.8.0_101” Java™ SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot™ 64-Bit Server VM (build 25.101-b13, mixed mode)

git version 2.13.0.windows.1

node: v8.1.3

npm: 5.0.3

yeoman: 1.8.5

yarn: 0.27.5

Browsers and Operating System

browser: chrome x64 59.0.3071.86 os: windows 10 x64

  • [x ] Checking this box is mandatory (this is just to show you read everything)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 30 (15 by maintainers)

Most upvoted comments

@lancurtis run npm rebuild node-sass

Oh sorry I read too fast, I thought it also failed on your Macbook Pro. Then this is just a node-sass installation issue on Windows -> have a look at https://github.com/sass/node-sass there are detailed instructions on this. It’s quite annoying to use on Windows as that’s a native package.

I tried several times on my windows pc. and the same project did works on my mac pro.

Maybe a network issue, can you delete your node_modules folder and try again?

@elharony did the same mistake just required to uncomment or delete those imports thanks for the help.

I’m sure of that it was not a network issue. It did worked fine on my Mac pro. the issue only occurred on my window pc.