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.
just follow the JHipster Quick Start and choose sass configuration
yarn start
JHipster version: 4.5.6
[email protected] H:\playground\angular\manager-demo
`-- [email protected]
.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"
]
}
}
entityName.json
files generated in the .jhipster
directoryls: no such file or directory: .jhipster/*.json
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 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
browser: chrome x64 59.0.3071.86
os: windows 10 x64
Maybe a network issue, can you delete your node_modules
folder and try again?
I tried several times on my windows pc. and the same project did works on my mac pro.
I'm sorry I can't reproduce on my MacBook Pro, either with version v4.5.6 or on the latest master branch.
Are you located in China? I think there are issues downloading this with the great firewall, I've seen people using alternative download locations for that.
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.
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.
@jdubois but I compiled the node-sass successfully.
Have a look at https://github.com/sass/node-sass/issues/1579#issuecomment-227661284
Seeing https://github.com/sass/node-sass/issues/1387 this seems like a common issue in fact
I had tried all of these solutions, it doesn't work for me. Maybe I should find a way that how to debug the webpack.
@Iancurtis I use to have issues with node-sass binding in Windows as well when node-gyp was not installed properly. Are you sure you have node-gyp installed properly else please check that as well? In either case, I think you have much better chance of finding help in Stackoverflow or node-sass repo forums than here
@deepu105 thanks, but I have several projects with node-sass works fine on my windows pc.
We dont do anything special for node-sass, we just use it as a dependency. So I'm not sure how we can help you here
Thanks anyway , I'll find a way to address this issue.
@jdubois @deepu105 yarn start
didn't recompile the vendor.dll.js, so run yarn cleanup
to solve it.
@Iancurtis we got rid of vendor.dll.js in the next version
@lancurtis run npm rebuild node-sass
@lmcardle Life saver. That worked perfectly.
@lmcardle thanks! It's very useful
Hey, I ran into this issue from a different point of view (again). My case was, that I could workaround this issue all the time using the command from @lmcardle, but this didn't help me inside our CI/CD platform, as gradle is doing the packaging. I struggled some hours and ended up with this solution: https://github.com/rails/webpacker/issues/422
And this got me rid of this very annoying one. Maybe considering a PR this to all yarn + sass setups?
@xetys the real reason for the issue is when you have different nodeJS versions (exact version) in the gradle config and your OS, so whichever version triggers the install will bind the binary to it and if you try to run it using another node version it will fail. I also used to get this issue in the past, but now I always keep my gradle node version in sync with my installed node version and I have never encountered the issue. So i'm not sure if another postInstall step is needed for this. What I dont understand is how you get this in a CI/CD if you are only using Gradle for all commands. The only possibility is if you are running yarn install manullay before doing gradle actions. In that case just make sure the CI/CD uses exact same Node version as the Gradle properties
I didn't know that and I encounter this issue every day with our registry (an old version) in my project. Our Jenkins build without problem.
That explains everything ! Thanks @deepu105 : should we document that ? A simple note to SASS option
Yes, we could
Thanks & Regards,
Deepu
On Fri, Mar 9, 2018 at 8:21 AM, Pascal Grimaud notifications@github.com
wrote:
I didn't know that and I encounter this issue every day with our registry
(an old version) in my project. Our Jenkins build without problem.
That explains everything ! Thanks @deepu105 https://github.com/deepu105
: should we document that ? A simple note to SASS option—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/6032#issuecomment-371733936,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABDlF5yjgxItDbsawtlAgm0ElmdGHDcdks5tci16gaJpZM4ONfGg
.
Another possibility for those who don't use sass directly could be to use --ignore-scripts
flags for npm install
or yarn install
. This way the node-sass postinstall script would not trigger.
closing this as its an environment issue
thanks deepu, I didn't know this and it happened again and again sometimes and was super annoying.
@lancurtis run
npm rebuild node-sass
It helped much really
i had the same i ssue, i syncronize project in my editor then npm start it works
Accidently, I found that I was importing a file in 2 components, I deleted the file, and removed it from ONE of the components... Until I found that it has been imported in a child component as well. Once I deleted the import
line from my 2nd component, it worked fine!
Hope it helps someone!!
ok
On Fri, Nov 8, 2019 at 5:26 AM Yahya Elharony notifications@github.com
wrote:
Accidently, I found that I was importing a file in 2 components, I deleted
the file, and removed it from ONE of the components... Until I found that
it has been imported in a child component as well. Once I deleted the
import line from my 2nd component, it worked fine!Hope it helps someone!!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/jhipster/generator-jhipster/issues/6032?email_source=notifications&email_token=AHLVNP5CKTMJXHV6ELSGMKLQSTE5ZA5CNFSM4DRV6GQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDOQNTQ#issuecomment-551356110,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHLVNP2XRSD262WPBXWNIHDQSTE5ZANCNFSM4DRV6GQA
.
@elharony did the same mistake just required to uncomment or delete those imports thanks for the help.
Most helpful comment
@lancurtis run
npm rebuild node-sass