-
-
Notifications
You must be signed in to change notification settings - Fork 24
Getting multiple errors when previewing new project #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @MarcoNPZ looks like you may be using old versions. Make sure you're using
Then here's a couple examples if starting fresh (which are already documented) but here for quick reference: A. Starting a new Angular web project and adding {N} to it afterwards:
B. Starting a new Angular NativeScript shared codebase from the start:
If updating existing @nativescript/schematics projects:
|
@NathanWalker Unless it's been updated in the last few days, there is no 9.x release on NPM that doesn't include the "@angular/[email protected]" and the "@angular/http" dependencies. I tested with a clean dev environment. However, if I pull from the master branch in this repo, everything works fine (possibly sans the Webpack Copy plug-in issue, but I haven't tested that). |
It was updated just yesterday and now supports Angular 10. |
So I'm new to angular and NativeScript programming, but I already have experience in programming. I wanted to dive into webprogramming, but keep running into errors. I tried to create a new Angular NativeScript project with:
ng new --collection=@nativescript/schematics helloworld2 --shared
The dependencies are a bit wrong atm (you can also see it in #279 and #280 so I removed @angular/http and changed @nativescript/schematics from 2.0.0 to 9.0.0 in the package.json file. And while
ng serve
works, as soon as I trytns run ios
ortns preview
my build fails with this massive error log, which I have no idea about what it means.Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
[non-empty string | object { from, to?, context?, globOptions?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item)
[non-empty string | object { from, to?, context?, globOptions?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item)
[non-empty string | object { from, to?, context?, globOptions?, toType?, force?, flatten?, transform?, cacheTransform?, transformPath?, noErrorOnMissing? }, ...] (should not have fewer than 1 item)
ValidationError: Invalid options object. Copy Plugin has been initialized using an options object that does not match the API schema.
at validate (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/schema-utils/dist/validate.js:96:11)
at new CopyPlugin (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/copy-webpack-plugin/dist/index.js:24:30)
at module.exports (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/webpack.config.js:304:13)
at handleFunction (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack-cli/bin/prepareOptions.js:23:13)
at prepareOptions (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack-cli/bin/prepareOptions.js:9:5)
at requireConfig (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack-cli/bin/convert-argv.js:136:14)
at /Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack-cli/bin/convert-argv.js:142:17
at Array.forEach ()
at module.exports (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack-cli/bin/convert-argv.js:140:15)
at /Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack-cli/bin/cli.js:241:39
at Object.parse (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack-cli/node_modules/yargs/yargs.js:567:18)
at /Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack-cli/bin/cli.js:219:8
at Object. (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack-cli/bin/cli.js:538:3)
at Module._compile (internal/modules/cjs/loader.js:1256:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1277:10)
at Module.load (internal/modules/cjs/loader.js:1105:32)
at Function.Module._load (internal/modules/cjs/loader.js:967:14)
at Module.require (internal/modules/cjs/loader.js:1145:19)
at require (internal/modules/cjs/helpers.js:75:18)
at Object. (/Users/marco/Documents/Programmieren/02_Angular/helloworld2/node_modules/webpack/bin/webpack.js:156:2)
at Module._compile (internal/modules/cjs/loader.js:1256:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1277:10)
at Module.load (internal/modules/cjs/loader.js:1105:32)
at Function.Module._load (internal/modules/cjs/loader.js:967:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
System is a MacBook Pro Late 2013. I hope anyone can help me.
The text was updated successfully, but these errors were encountered: