You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment
My environment is as follows:
1 - Emulator: Pixel 3A
2 - Device: Galaxy s8+
3 - OS: android 9
4 - SDK: 28
5 - NativeScript: 6.2.0
Describe the bug
I'm having issue getting NativeScript to work after upgrading it to the latest version, when I create new project and try to run it tns run android I get the following error:
Error: Cannot find module '/Users/pro/demo/webpack.config.js'
Require stack:
- /Users/pro/demo/node_modules/webpack-cli/bin/convert-argv.js
- /Users/pro/demo/node_modules/webpack-cli/bin/cli.js
- /Users/pro/demo/node_modules/webpack/bin/webpack.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (/Users/pro/demo/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at WEBPACK_OPTIONS (/Users/pro/demo/node_modules/webpack-cli/bin/convert-argv.js:133:13)
at requireConfig (/Users/pro/demo/node_modules/webpack-cli/bin/convert-argv.js:135:6)
at /Users/pro/demo/node_modules/webpack-cli/bin/convert-argv.js:142:17
at Array.forEach (<anonymous>)
at module.exports (/Users/pro/demo/node_modules/webpack-cli/bin/convert-argv.js:140:15)
at /Users/pro/demo/node_modules/webpack-cli/bin/cli.js:241:39
at Object.parse (/Users/pro/demo/node_modules/yargs/yargs.js:567:18)
at /Users/pro/demo/node_modules/webpack-cli/bin/cli.js:219:8
at Object.<anonymous> (/Users/pro/demo/node_modules/webpack-cli/bin/cli.js:538:3)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/Users/pro/demo/node_modules/webpack/bin/webpack.js:155:2)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/Users/pro/demo/node_modules/webpack-cli/bin/convert-argv.js',
'/Users/pro/demo/node_modules/webpack-cli/bin/cli.js',
'/Users/pro/demo/node_modules/webpack/bin/webpack.js'
]
}
Executing webpack failed with exit code 1.
I tried to uninstall node and NativeScript and install them again, but still getting the same error.
I tried to create new project and run it using sidekick but still getting the same error
Webpack seem not to be creating webpack.config.js at all, I can see the plugin is being installed but it doesn't create a webpack.config.js file.
The text was updated successfully, but these errors were encountered:
@NickIliev Thank you for your response. The version of nativescript-dev-webpack is 1.3.0
I ran
npm i nativescript-dev-webpack@latest --save-dev
./node_modules/.bin/update-ns-webpack --deps --configs
npm i
And it worked just fine, thank you. I wonder why this happens for newly created projects. So whenever I create new project in the future, I have to run that commend
The above-mentioned update commands are executed during the postinstall scripts of the nativescript-dev-webpack plugin.
A possible reason for not getting the webpack.config.js could be disabled npm scripts. You could check their status by executing npm config get ignore-scripts. If your scripts are not disabled, I suggest you remove your node_modules and execute npm i --loglevel verbose in order to check the logs of the nativescript-dev-webpack' post-install.
Environment
My environment is as follows:
1 - Emulator: Pixel 3A
2 - Device: Galaxy s8+
3 - OS: android 9
4 - SDK: 28
5 - NativeScript: 6.2.0
Describe the bug
I'm having issue getting NativeScript to work after upgrading it to the latest version, when I create new project and try to run it
tns run android
I get the following error:I tried to uninstall node and NativeScript and install them again, but still getting the same error.
I tried to create new project and run it using sidekick but still getting the same error
Webpack seem not to be creating webpack.config.js at all, I can see the plugin is being installed but it doesn't create a webpack.config.js file.
The text was updated successfully, but these errors were encountered: