How to update dev plugin in Nativescript? - nativescript

This may be a noob question but I can't figure out how to update a plugin under devDependencies. I want to update "#nativescript/webpack" which is currently at ~5.0.0-beta.0. There is 5.1 available but I can't update it.
I've tried
ns plugin update #nativescript/webpack
npm i -g #nativescript/webpack
npm i #nativescript/webpack --save-dev
none of these work.

npm i --save-dev #nativescript/webpack
is how you do it as per this comment

Related

1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)

How can I solve this warning when creating laravel project?
1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
Steps to replicate:
composer create-project --prefer-dist laravel/laravel example
cd example
composer require laravel/ui
php artisan ui vue --auth
npm install vue#next vue-router#next vue-loader#next
npm install
npm run dev
EDIT
From this solution, add these lines to webpack.mix.js
mix.webpackConfig({
stats: {
children: true,
},
});
The above solution creates another warning:
WARNING in ./resources/sass/app.scss (./node_modules/css-loader/dist/cjs.js??clonedRuleSet-6.use1!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-6.use[2]!./node_modules/resolve-url-loader/index.js??clonedRuleSet-6.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-6.use[4]!./resources/sass/app.scss)
Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning
(2423:3) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
Child mini-css-extract-plugin C:\xampp\htdocs\lva\node_modules\css-loader\dist\cjs.js??clonedRuleSet-6.use1!C:\xampp\htdocs\lva\node_modules\postcss-loader\dist\cjs.js??clonedRuleSet-6.use[2]!C:\xampp\htdocs\lva\node_modules\resolve-url-loader\index.js??clonedRuleSet-6.use[3]!C:\xampp\htdocs\lva\node_modules\sass-loader\dist\cjs.js??clonedRuleSet-6.use[4]!C:\xampp\htdocs\lva\resources\sass\app.scss compiled with 1 warning
webpack compiled with 1 warning
How can I solve this?
The color-adjust shorthand is currently deprecated and it depends on the autoprefixer#10.4.6 (source).
I was able to fix this by reverting the autoprefixer package as well as #Benno to version 10.4.5. Run this:
npm install autoprefixer#10.4.5 --save-exact
You probably updated your npm packages. I was able to fix this by reverting the autoprefixer package to version 10.4.5 in the package-lock.json.
when you have problem with autoprefixer maybe because your version autoprefixer. you can add version autoprefixer based problem this version autoprefixer . i have problem on "print-color-adjust" and i add code on my package.json for change my autoprefixer become version "10.4.5"
when you use npm
"overrides": {
"autoprefixer": "10.4.5"
},
Or, when you use yarn
"resolutions": {
"autoprefixer": "10.4.5"
},
Don't forget to delete your package-lock and node_modules , then npm install again.
it work for me (react-bootstrap.v.5)
If you don't want to add additional packages to solve this error, then try this:
Capitalize all the files and Directory name in your components folder
Or you can run this command to install a package if the above solution doesn't work.
npm install autoprefixer#10.4.5 --save-exact
I'm using React with InertiaJS and Laravel as backend, this solution worked in my case.
Thanks
I have the same problem, whenever I hit save an annoying pop-up of error code comes. The simple solution is to add the following code to your webpack.mixjs file :
mix.webpackConfig({
stats: {
children: true,
},});
stop the npm run watch
add a package autoprefixer, add below in terminal:
npm install autoprefixer#10.4.5 --save-exact
run npm run watch and it will not give the error again.
I solved this issue within Laravel by changing the file ./node_modules/bootstrap/scss/forms/_form-check.scss
Line 28 part of the .form-check-input style
change color-adjust: exact; // Keep themed appearance for print
to print-color-adjust: exact; // Keep themed appearance for print

How do I update just the "nativescript-vue" package in my project?

I'm new to Nativescript and Mobile app development in general. How do I update just the "nativescript-vue" package in my project? My project has nativescript-vue version 2.4.0, but I'm trying to update to version 2.6.1.
Here is a snippet from the packson.json in my project.
"#nativescript/theme": "~2.2.1",
"nativescript-vue": "~2.4.0",
"tns-core-modules": "~6.3.0"
Either change in package.json to "nativescript-vue": "~2.6.1", and run npm install or simply run npm update nativescript-vue.
Ok, I figured out how to do it.
From the terminal I ran the following command...
npm i nativescript-vue#2.6.1
You could open the Project in vscode and run the command from the terminal there too.
To get the latest version run
npm i nativescript-vue#latest

"This dependancy was not found" when i try to import from ckeditor

I try to create a custom plugin. Wheni import Image from '#ckeditor/ckeditor5-image/src/image' i get an error
This dependency was not found:
* -!../../../css-loader/index.js??ref--6-oneOf-3-1!../../../postcss- loader/src/index.js??ref--6-oneOf-3-2!./#ckeditor/ckeditor5-theme- lark/theme/mixins/_rwd.css in ./node_modules/css-loader??ref--6-oneOf-3-
1!./node_modules/postcss-loader/src??ref--6-oneOf-3-
2!./node_modules/#ckeditor/ckeditor5-image/theme/textalternativeform.css
To install it, you can run: npm install --save -!../../../css-
loader/index.js??ref--6-oneOf-3-1!../../../postcss-loader/src/index.js??
ref--6-oneOf-3-2!./#ckeditor/ckeditor5-theme-lark/them
How should i fix it? I've installed this package https://github.com/ckeditor/ckeditor5-theme-lark and there is no effect.
Make sure you have created the vue.config.js file and included the details from
https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs.html
Make sure #ckeditor/ckeditor5-theme-lark is installed
npm install --save #ckeditor/ckeditor5-theme-lark
That should then fix the issue
after modified the vue.config.js make sure you are re-run again your VUE application
npm run dev
or
npm run serve
In my case, I got same error because I did not follow the guide very well. After read it I had to run this:
npm install #ckeditor/ckeditor5-theme-lark
npm install --save #ckeditor/ckeditor5-vue2 #ckeditor/ckeditor5-dev-webpack-plugin #ckeditor/ckeditor5-dev-utils postcss-loader#4 raw-loader#4
For specific modules selected, something like this:
npm install --save #ckeditor/ckeditor5-basic-styles #ckeditor/ckeditor5-editor-classic #ckeditor/ckeditor5-horizontal-line #ckeditor/ckeditor5-alignment #ckeditor/ckeditor5-autosave #ckeditor/ckeditor5-adapter-ckfinder #ckeditor/ckeditor5-essentials #ckeditor/ckeditor5-font #ckeditor/ckeditor5-heading #ckeditor/ckeditor5-image #ckeditor/ckeditor5-indent #ckeditor/ckeditor5-link #ckeditor/ckeditor5-list #ckeditor/ckeditor5-paragraph #ckeditor/ckeditor5-paste-from-office #ckeditor/ckeditor5-remove-format #ckeditor/ckeditor5-typing #ckeditor/ckeditor5-basic-styles
Then, in my case I use VUE 2+ version, so I had to modify the vue.config.js file, accorging the official documentation: https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/vuejs-v2.html
Plase check the documentation with your specific framework: https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/overview.html

why can't create new app in react native

I'm beginner in react-native and I doing steps in a website of react-native
and the app is working right,
but after doing some update
npm i react#latest --save
npm i react-native#latest --save
react-native upgrade
after that, I can't create any project by
react-native init projectName
I get this error
image link
This is actually a problem on Windows with the latest version of react native (0.56)
GitHub Issue
Try using version 0.55.4 by typing react-native init --version="0.55.4" projectName
Not every version of react-native is compatible with every version of react. In the screenshot you sent, it says you need react#16.4.1 for react-native#0.56.0. Try doing npm i react#16.4.1 --save and then try react-native init projectName again.

With Node 0.12.2 and npm 2.7.4 ionic installation error on windows 7

I am downloaded the node installation file "node-v0.12.2-x64.msi" for 64 bit windows 7 OS. All node and npm commands are working fine. I checked both the node and npm versions.
But when I try to install ionic by the following command:
npm install -g cordova ionic
Its gives me the following error:
npm WARN engine cordova-js#3.9.0: wanted: {"node":"~0.10.x"} (current: {"node":"
0.12.2","npm":"2.7.4"})
npm WARN engine npm#1.3.4: wanted: {"node":">=0.6","npm":"1"} (current: {"node":
"0.12.2","npm":"2.7.4"})
npm WARN engine xmlbuilder#2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {
"node":"0.12.2","npm":"2.7.4"})
npm WARN installMany normalize-package-data was bundled with npm#1.3.4, but bund
led package wasn't found in unpacked tree
npm ERR! tar.unpack untar error C:\Users\Biswarup\AppData\Local\Temp\npm-1484-8b
f97a1e\registry.npmjs.org\request\-\request-2.9.203.tgz
npm ERR! cb() never called!
Biswarup is my username in above all cases.
I check the following links for troubleshooting, but nothing works for me.
https://github.com/npm/npm/wiki/Troubleshooting#error-enoent-stat-cusersuserappdataroamingnpm-on-windows-7
https://github.com/diegonetto/generator-ionic/issues/42
Please guide me, I am totally stuck at that point. Try to removing node js and reinstalling it many times. But nothing goes right.
First of all packages warning you, that it requires nodejs 0.10.x and may be that is a reason.
Another try you can upgrade npm and try to found new version. So here steps to do it:
npm cache clean
npm update -g npm
npm cache clean
Please download Node 0.10.38
I was too having problem with newer version of node.
I have already aswered this in detail https://stackoverflow.com/a/31124491/1276616

Resources