The NPM installation failed(Babylon.js-master)


版本号

When I run the project on my computer, I always get an error.Whether the compatibility of Babylon against the system needs to be improved

Try to do npm install from the Babylon root directory, not from Tools\Gulp.

It still cannot be installed, I don’t know what the problem is, I have followed the official tutorial

Adding @sebavan

This is really strange as I can not repro locally or on the servers what version of node are you using ?

But on the side it kind of makes sense related to the error displayed.

I have attempted a fix here: Try fix build by sebavan · Pull Request #10107 · BabylonJS/Babylon.js · GitHub

My node version is 14.16.0.
I think developers should focus more on engines and functions rather than waste too much time on project construction. They should reduce the impact of these projects on the environment. It would be better for novices to open local cases and projects more easily.

I had a similar situation two years ago. The compilation of the Babylon project was so complicated that I gave up Babylon and chose it three.js Now the ecosystem of Babylon is better. I hope that Babylon master will be more friendly to novices, so that more 3D developers will choose Babylon

Are you using NPM 7? This looks like an NPM 7 issue. Basically NPM 7 errors out now when packages have dependencies that don’t match.

if you want to continue using npm 7 run npm i --legacy-peer-deps until the issues have been resolved. @sebavan may have fixed it with the changes they posted.

I do not blame anyone on the babylon team for the billions of development configurations that can and will break someones setup current configuration. especially running latest and greatest that may not have been verified yet.

The quick responsiveness of everyone on this team is what makes me continue with babylon. Thank you @sebavan for the quick turn around possible fix! Keep up the amazing work!

1 Like

Yes, my NPM is 7.7。I used npm i --legacy-peer-dep still doesn’t solve the problem. It’s a real headache.


The response speed of the Babylon team is very fast, very good

Yup, this is due to npm 7 actually doing the right thing here and checking version ranges for dependencies :slight_smile:

I am currently upgrading the dependencies to fix it, It might take a couple more days, but this is for the best.

@brightMoon the only real difference here is instead of doing npm install and npm run start in the main folder, you do it in tools/gulp. You are unfortunate to be the first one to figure on latest node versions :frowning: We understand the build can be overwhelming and are planning to adapt it this fall with @RaananW

1 Like

OK, let me lower the Npm version to verify. I had to upgrade NPM for previous project reasons. Babylon is getting faster and faster :smiley:

Problems with build

31 03 2021 11:06:12.174:WARN [filelist]: Pattern “E:/babylon库/Babylon.js-master/!.//*.d.ts" does not match any file.
31 03 2021 11:06:12.174:WARN [filelist]: Pattern “E:/babylon库/Babylon.js-master/favicon.ico” does not match any file.
31 03 2021 11:06:12.174:WARN [filelist]: Pattern "E:/babylon库/Babylon.js-master/assets/
/*” does not match any file.
31 03 2021 11:06:14.402:INFO [karma-server]: Karma v5.2.3 server started at http://localhost:3001/karma/
31 03 2021 11:06:14.402:INFO [launcher]: Launching browsers Firefox with concurrency 1
31 03 2021 11:06:14.403:INFO [launcher]: Starting browser Firefox
31 03 2021 11:11:14.416:WARN [launcher]: Firefox have not captured in 300000 ms, killing.
31 03 2021 11:11:16.427:WARN [launcher]: Firefox was not killed in 2000 ms, sending SIGKILL.
31 03 2021 11:11:18.434:WARN [launcher]: Firefox was not killed by SIGKILL in 2000 ms, continuing.
[11:11:18] ‘tests-validation-virtualscreen’ errored after 5.1 min
[11:11:18] Error: 1
at formatError (E:\babylon库\Babylon.js-master\Tools\Gulp\node_modules\gulp-cli\lib\versioned^4.0.0\format-error.js:21:10)
at Gulp. (E:\babylon库\Babylon.js-master\Tools\Gulp\node_modules\gulp-cli\lib\versioned^4.0.0\log\events.js:33:15)
at Gulp.emit (events.js:327:22)
at Gulp.EventEmitter.emit (domain.js:467:12)
at Object.error (E:\babylon库\Babylon.js-master\Tools\Gulp\node_modules\undertaker\lib\helpers\createExtensions.js:61:10)
at handler (E:\babylon库\Babylon.js-master\Tools\Gulp\node_modules\now-and-later\lib\mapSeries.js:47:14)
at f (E:\babylon库\Babylon.js-master\Tools\Gulp\node_modules\once\once.js:25:25)
at f (E:\babylon库\Babylon.js-master\Tools\Gulp\node_modules\once\once.js:25:25)
at tryCatch (E:\babylon库\Babylon.js-master\Tools\Gulp\node_modules\async-done\index.js:24:15)
at done (E:\babylon库\Babylon.js-master\Tools\Gulp\node_modules\async-done\index.js:40:12)
at removeAllListeners (E:\babylon库\Babylon.js-master\node_modules\karma\lib\server.js:402:11)
at E:\babylon库\Babylon.js-master\node_modules\karma\lib\server.js:409:11
at Server.close (net.js:1606:9)
at Object.onceWrapper (events.js:421:28)
at Server.emit (events.js:327:22)
at Server.EventEmitter.emit (domain.js:529:15)
[11:11:18] ‘tests-all’ errored after 6.92 min
[11:11:18] ‘default’ errored after 16 min
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! babylonjs-gulp@0.0.0 build: gulp --max-old-space-size=8192 --tsLintFix
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the babylonjs-gulp@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm run start starts the project normally

About the full build could you try in a folder without unicode caracters in the path ? I am wondering if it could be the issue here.

We also merged a fix for the previous issue

Unfortunately, the build is still unsuccessful using the English directory.
So, npm run build is not successful on some machines.

It would be a good thing if it could be fixed

Do you have an uptodate version oc firefox on this machine ?

No, I only have Chrome. Can Firefox verify anything?

Firefox is mandatory to run the full build locally Start Contributing to Babylon.js | Babylon.js Documentation

This is the only browser that works well for our automated CI tests.