An unhandled exception occurred: Cannot find module './getBigInt'
π Bug report
Command (mark with an x)
- [ ] new
- [ ] build
- [ x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] extract-i18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Is this a regression?
Yes, the previous version in which this bug was not present was: 11 and 12Description
When I run ng serve for an app newly created with angular cli I get an error.π¬ Minimal Reproduction
- ng new geofaker-app
- cd geofaker-app
- ng serve
π₯ Exception or Error
Generating browser application bundles (phase: setup)...An unhandled exception occurred: Cannot find module './getBigInt'
Require stack:
- /Users/arek/Development/geofaker-app/node_modules/memfs/lib/Stats.js
- /Users/arek/Development/geofaker-app/node_modules/memfs/lib/index.js
- /Users/arek/Development/geofaker-app/node_modules/webpack-dev-middleware/dist/utils/setupOutputFileSystem.js
- /Users/arek/Development/geofaker-app/node_modules/webpack-dev-middleware/dist/index.js
- /Users/arek/Development/geofaker-app/node_modules/webpack-dev-server/lib/Server.js
- /Users/arek/Development/geofaker-app/node_modules/@angular-devkit/build-webpack/src/webpack-dev-server/index.js
- /Users/arek/Development/geofaker-app/node_modules/@angular-devkit/build-webpack/src/index.js
- /Users/arek/Development/geofaker-app/node_modules/@angular-devkit/build-angular/src/builders/dev-server/index.js
- /Users/arek/Development/geofaker-app/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /Users/arek/Development/geofaker-app/node_modules/@angular-devkit/architect/node/index.js
- /Users/arek/Development/geofaker-app/node_modules/@angular/cli/models/architect-command.js
- /Users/arek/Development/geofaker-app/node_modules/@angular/cli/commands/serve-impl.js
- /Users/arek/Development/geofaker-app/node_modules/@angular-devkit/schematics/tools/export-ref.js
- /Users/arek/Development/geofaker-app/node_modules/@angular-devkit/schematics/tools/index.js
- /Users/arek/Development/geofaker-app/node_modules/@angular/cli/utilities/json-schema.js
- /Users/arek/Development/geofaker-app/node_modules/@angular/cli/models/command-runner.js
- /Users/arek/Development/geofaker-app/node_modules/@angular/cli/lib/cli/index.js
- /usr/local/lib/node_modules/@angular/cli/lib/init.js
See "/private/var/folders/gx/n8r6j2c94yqddxsfsjxfwz2h0000gp/T/ng-YnggzR/angular-errors.log" for further details.
π Your Environment
/ β³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 13.3.5
Node: 16.15.0
Package Manager: npm 8.5.5
OS: darwin x64
Angular: 13.3.8
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1303.5
@angular-devkit/build-angular 13.3.5
@angular-devkit/core 13.3.5
@angular-devkit/schematics 13.3.5
@angular/cli 13.3.5
@schematics/angular 13.3.5
rxjs 7.5.5
typescript 4.6.4
Anything else relevant?
I just downgraded to node v14.19.3 and this seems to work. What is the last version of node which should be fine for @angular/cli?
Node version 16 is supported in version 13.
This seems to be an issue in your local environment.
Can you try to re-install node_modules?
If the problem persists can you also try to clean the npm cache using npm cache clean β-force?
Had the same issue... 2 fixes worked for me:
- manually install npm package memfs
- just nuke everything and
ng newagain also worked
@arekgotfryd looks like memfs just updated their package again. I think getBigInt.js was missing from 3.4.2. I installed 3.4.1 and it worked. Now I see there is a 3.4.3 out there on npmjs...
Removing the package lock file and re-running a fresh installations should fix this issue.
when you want to run the app for the first time it needs internet for some pakages and maybe you were offline thats whay it through that exception.
when you want to run the app for the first time it needs internet for some pakages and maybe you were offline thats whay it through that exception.
Thatβs not correct. Internet is not needed to build or run the application. Internet is needed to download the packages during npm or yarn install.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.