Closed ghost closed 6 years ago
I am having the same issue since upgrading the NS v4.1.0 and I am not using webpack to build my project.
@jannotabamo et @shivapersad I believe you might need to update you {N} Angular dependencies to v6.
Same problem here after upgrading to v4.1.0 - I'm not using Angular.
Yeah no angular here either
Can you guys try running
./node_modules/.bin/update-ns-webpack --deps
per https://www.nativescript.org/blog/upgrading-to-nativescript-webpack-0.12.0
I had a similar issue and solved it by updating typescript to 2.7.*
see https://github.com/NativeScript/nativescript-cli/issues/3663
@jannotabamo you might also want to update the webpack.config.js
./node_modules/.bin/update-ns-webpack --configs
Detailed information on what has changed and instructions on how to migrate to 0.12 can be found here
@NickIliev
./node_modules/.bin/update-ns-webpack --configs
is not working I have the same issue
@isaacfi if you are hitting the same error log it is very likely that you need to update the dependencies in your project.
rm -rf node_modules platforms hooks
npm i tns-core-modules@latest --save
npm i nativescript-angular@latest --save
npm i nativescript-dev-webpack@latest --save
./node_modules/.bin/update-app-ng-deps
./node_modules/.bin/update-ns-webpack --configs --deps
npm i
tns platform add android
tns build android
Do let me know if you are still experiencing troubles after the above steps (and provide any related error log and details)
Closing as the issue is not reproducible with nativescript-dev-webpack@0.12 and the latest modules.
Issue Checklist
Tell us about the problem
When I upgraded my nativescript to
v4.1.0
, I encountered an error when building with webpack. I don't have a problem before. It only occur when I upgraded tov4.1.0
Local environment
Mac
v8.11.2
v4.1.0
Project data
const { resolve, join } = require("path");
const webpack = require("webpack"); const nsWebpack = require("nativescript-dev-webpack"); const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target"); const CopyWebpackPlugin = require("copy-webpack-plugin"); const ExtractTextPlugin = require("extract-text-webpack-plugin"); const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
module.exports = env => { const platform = env && (env.android && "android" || env.ios && "ios"); if (!platform) { throw new Error("You need to provide a target platform!"); } const platforms = ["ios", "android"]; const { snapshot, uglify, report, aot } = env; const ngToolsWebpackOptions = { tsConfigPath: "tsconfig.json" };
};