question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App doesn't build after ns clean

See original GitHub issue

Environment

  "dependencies": {
    "@angular/animations": "~11.2.7",
    "@angular/common": "~11.2.7",
    "@angular/compiler": "~11.2.7",
    "@angular/core": "~11.2.7",
    "@angular/forms": "~11.2.7",
    "@angular/platform-browser": "~11.2.7",
    "@angular/platform-browser-dynamic": "~11.2.7",
    "@angular/router": "~11.2.7",
    "@nativescript/angular": "~11.8.0",
    "@nativescript/core": "~8.0.0",
    "@nativescript/theme": "~3.0.1",
    "reflect-metadata": "~0.1.13",
    "rxjs": "^6.6.7",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~11.2.7",
    "@nativescript/android": "8.0.0",
    "@nativescript/ios": "8.0.0",
    "@nativescript/webpack": "5.0.0-beta.2",
    "@ngtools/webpack": "~11.2.6",
    "typescript": "~4.0.0"
  }

Describe the bug After cleaning the project with ns clean and starting the app again, webpack aborts with the message :

ns debug ios
Searching for devices...
Copying template files...
Platform ios successfully added. v8.0.0
Preparing project...
Compiling @angular/core : module as esm2015
Compiling @angular/animations : module as esm2015
Compiling @angular/animations/browser : module as esm2015
Compiling @angular/common : module as esm2015
Compiling @angular/platform-browser : module as esm2015
Compiling @angular/router : module as esm2015
Compiling @angular/forms : module as esm2015
Compiling @angular/platform-browser/animations : module as esm2015
Compiling @angular/common/http : module as esm2015
Compiling @nativescript/angular : module as esm2015
webpack is watching the files...
./foo/node_modules/@nativescript/webpack/node_modules/webpack/lib/NormalModuleFactory.js:703
				throw new Error(
				      ^
Error: NormalModuleFactory.beforeResolve (angular-compiler) is no longer a waterfall hook, but a bailing hook instead. Do not return the passed object, but modify it instead. Returning false will ignore the request and results in no module created.
    at ./foo/node_modules/@nativescript/webpack/node_modules/webpack/lib/NormalModuleFactory.js:703:11
    at eval (eval at create (./foo/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
Executing webpack failed with exit code 1.

To Reproduce

  1. ns create foo --template @nativescript/template-blank-ng
  2. cd foo
  3. ns debug ios
  4. ctrl-c
  5. ns clean
  6. npm i
  7. ns debug ios

The same goes for Android

Expected behavior The app starts as expected

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
mwwebdevcommented, Nov 16, 2021

Same here tried to migrate an old project to NS 8 and Webpack5. Only got errors for modules which can’t be found. Tried several solutions, but nothing worked, it seems that some 3rd-Party modules not work with webpack5.

3reactions
gyan-nsfcommented, Apr 6, 2021

same here

Read more comments on GitHub >

github_iconTop Results From Across the Web

App doesn't build after ns clean - Bountysource
After cleaning the project with ns clean and starting the app again, webpack aborts with the message : ns debug ios Searching for...
Read more >
ns create cannot create a working project - Stack Overflow
I do the following: ns create HelloNg --template @nativescript/template-tab-navigation-ng ns create BlankNg --template ...
Read more >
Troubleshooting Common Issues - NativeScript Docs
If you ever see a build issue like the following: ... Be sure to ns clean each time you make adjustment before running...
Read more >
cannot find module [Node npm Error Solved] - freeCodeCamp
delete package.lock.json file by running rm -f package-lock.json; clean up the NPM cache by running npm cache clean --force ...
Read more >
Team set to None unless I select A… | Apple Developer Forums
It looks like you may have a hard-coded provisioning profile in your Build Settings, which the settings in Project Editor is not overriding....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found