Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
Describe the bug
I'm trying to migrate my app to ns 8 to use webpack 5 and stuffs like RootLayout, When ns migrate is completed there is no webpack.config.js (has beed removed during the migration). So an error exists:
Preparing project...
Found peer TypeScript 4.1.5
The webpack configuration file C:\Projekty\voclick.com\webpack.config.js does not exist. Ensure the file exists, or update the path in nativescript.config.(js|ts).
Error: Cannot find module '@ngtools/webpack'
Require stack:
- C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\configuration\angular.js
- C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\configuration\index.js
- C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\index.js
- C:\Projekty\myapp\webpack.config.js
- C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\bin\index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at getAngularCompilerPlugin (C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\configuration\angular.js:139:39)
at default_1 (C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\configuration\angular.js:76:35)
at C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\index.js:128:13
at Array.forEach (<anonymous>)
at resolveChainableConfig (C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\index.js:126:10)
at Object.resolveConfig (C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\index.js:155:42)
at module.exports (C:\Projekty\myapp\webpack.config.js:6:18)
at Command.<anonymous> (C:\Projekty\myapp\node_modules\@nativescript\webpack\dist\bin\index.js:60:44)
at Command.listener [as _actionHandler] (C:\Projekty\myapp\node_modules\@nativescript\webpack\node_modules\commander\index.js:922:31)
at Command._parseCommand (C:\Projekty\myapp\node_modules\@nativescript\webpack\node_modules\commander\index.js:1503:14)
at Command._dispatchSubcommand (C:\Projekty\myapp\node_modules\@nativescript\webpack\node_modules\commander\index.js:1443:18)
at Command._parseCommand (C:\Projekty\myapp\node_modules\@nativescript\webpack\node_modules\commander\index.js:1460:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Projekty\\myapp\\node_modules\\@nativescript\\webpack\\dist\\configuration\\angular.js',
'C:\\Projekty\\myapp\\node_modules\\@nativescript\\webpack\\dist\\configuration\\index.js',
'C:\\Projekty\\myapp\\node_modules\\@nativescript\\webpack\\dist\\index.js',
'C:\\Projekty\\myapp\\webpack.config.js',
'C:\\Projekty\\myapp\\node_modules\\@nativescript\\webpack\\dist\\bin\\index.js'
]
}
No configuration!
Executing webpack failed with exit code 0.
Do I need to install @ngtools/webpack, or modify webpack file somehow?
Environment Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):CLI: 8.0.1 Cross-platform modules: 8.0.5 Android Runtime: ^8.0.0
Describe the bug I'm trying to migrate my app to ns 8 to use webpack 5 and stuffs like RootLayout, When ns migrate is completed there is no webpack.config.js (has beed removed during the migration). So an error exists:
Preparing project... Found peer TypeScript 4.1.5
The webpack configuration file C:\Projekty\voclick.com\webpack.config.js does not exist. Ensure the file exists, or update the path in nativescript.config.(js|ts).
So I created a file with
After this, now I have:
Do I need to install @ngtools/webpack, or modify webpack file somehow?