I upgraded node.js and npm and did an npm install and now I'm getting the message below. The thing is, I have been working on the application for about a year and gulp-sass is installed (it's what I use to upgrade my sass files) so it is clearly do to the upgrade, but I'm not sure how to get everything to work again, sort of downgrading everything again.
$ ionic serve
Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'gulp-sass'
Do you need to run `npm install`?
When I try npm install gulp-sass:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\gulp-minify-css\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\karma-junit-reporter\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\karma-mocha-reporter\package.json'
npm WARN rcreditsmobile#1.1.1 No repository field.
npm WARN rcreditsmobile#1.1.1 No license field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Users\\Public\\Programs\\nodejs\\node.exe" "C:\\Users\\Someone\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp-sass" "--save"
npm ERR! node v6.9.5
npm ERR! npm v4.2.0
npm ERR! path E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at moveAway (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:42:5)
npm ERR! at destStatted (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:31:7)
npm ERR! at C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at moveAway (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:42:5)
npm ERR! at destStatted (C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:31:7)
npm ERR! at C:\Users\Someone\AppData\Roaming\npm\node_modules\npm\node_modules\graceful-fs\polyfills.js:287:18
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\node-sass' -> 'E:\xampp\htdocs\cgf\rcredits-mobile\node_modules\.node-sass.DELETE'
npm ERR! at Error (native) parent: 'rcreditsmobile' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Someone\AppData\Roaming\npm-cache\_logs\2017-02-11T01_17_29_643Z-debug.log
I found an answer on the ionic forum that works, the relevant part is below with a few modifications for clarity:
Just add this to your gulpfile.js
gulp.task('serve:before', ['default']);
That line tells the new ionic 2 client to run the old ionic 1.x client
'default' task before serving (before running ionic serve)
Also you need to add your ionic.config.json file this:
{
...
"app_id": "",
"v2": false,
"typescript": false,
"watch": {
"sass": ["scss/**/*.scss"],
"html": ["www/**/*.html"],
"livereload": [
"www/**/*.html",
"www/**/*.js",
"www/**/*.css"
]
}
...
}
Ref: https://forum.ionicframework.com/t/ionic2-cli-doesnt-run-gulp-tasks-on-ionic-serve/49085/7
I've encountered this problem before. What I've tried so far:
Reinstall the node.js. You may refer https://nodejs.org/en/download/
Run in command line: npm rebuild node-sass
Then try run ionic serve. Hope it helps you.
Related
I am trying to deploy my local development to GitHub and also let my Webserver pull from Github (which works fine).
I clone my Laravel Repository from Github to my Server. After that I run composer install (which works fine).
But when running npm install I get the following error:
npm ERR! Cannot read property 'length' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR! /.npm/_logs/2017-11-12T14_48_59_351Z-debug.log
I checked the log file: it is empty.
Further, running other commands like npm help config throws this error:
npm ERR! file man
npm ERR! path man
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn man
npm ERR! enoent spawn man ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! enoent Check if the file 'man' is present.
npm ERR! A complete log of this run can be found in:
npm ERR! /.npm/_logs/2017-11-12T14_49_57_777Z-debug.log
I just installed node and npm on my shared hosting via the command line.
npm -v results in 5.5.1
Any ideas how to solve this? Could this be an error within NPM?
EDIT
I tried several other node & npm versions and with node.js v7.10.1 and npm 4.2.0 at least npm install starts running. It then produces the following error (which brings me to the conclusion that I need a newser version of npm, but the newer versions throw the errors mentioned above):
└── vuejs-datepicker#0.9.19
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-98-generic
npm ERR! argv "node" "/node-v7.10.1-linux-x64/bin/npm" "install"
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mozjpeg#4.1.1 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mozjpeg#4.1.1 postinstall script 'node lib/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mozjpeg package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node lib/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mozjpeg
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mozjpeg
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /.npm/_logs/2017-11-12T15_23_08_709Z-debug.log
Any way I could come around this issue without installing a new npm version? That might help me, too. I am very grateful for any help.
Thank you!
I am angular2 beginner. I am try to install angular IDE in my won system but it does not install.
Command : -
npm install -g angular-ide
error:-
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/angular-ide/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! Linux 4.4.0-75-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "angular-ide"
npm ERR! node v7.8.0
npm ERR! npm v4.2.0
npm ERR! path ../lib/node_modules/angular-ide/bin/ngide
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '../lib/node_modules/angular-ide/bin/ngide' -> '/usr/bin/ngide'
npm ERR! { Error: EACCES: permission denied, symlink '../lib/node_modules/angular-ide/bin/ngide' -> '/usr/bin/ngide'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'symlink',
npm ERR! path: '../lib/node_modules/angular-ide/bin/ngide',
npm ERR! dest: '/usr/bin/ngide' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/iron/.npm/_logs/2017-05-01T03_32_46_250Z-debug.log
Please tell us how to install angular IDE?
sudo npm install -g angular-ide
Its says access problem , so try this .
step 1:
cd /home/user/Downloads
step 2:
chmod +x angularide-ci-2020.7.22-offline-installer-linux.run
step 3:
./angularide-ci-2020.7.22-offline-installer-linux.run
step 4:
it will launch the widget
step 5:
Follow the instructions
step 6:
Done
I have tried to install angular cli with latest version of node as you mentioned. But it is unsuccessful. I have tried it with admin user only
FYI- I have tried it on another machine freshly there also it says the same
OS: windows7 64
node v7.9.0
npm: v4.2.0
error: EPERM: operation not permitted to rename package.json
C:\Windows\system32>npm install -g #angular/cli --save
C:\Users\001091\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules\#a
ngular\cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "#angular/cli" "--save"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! path C:\Users\001091\AppData\Roaming\npm\node_modules\.staging\url-pars
e-e45d5bd3\package.json.1317145617
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\001091\AppData\
Roaming\npm\node_modules\.staging\url-parse-e45d5bd3\package.json.1317145617' ->
'C:\Users\001091\AppData\Roaming\npm\node_modules\.staging\url-parse-e45d5bd3\p
ackage.json'
npm ERR! { Error: EPERM: operation not permitted, rename 'C:\Users\001091\AppDa
ta\Roaming\npm\node_modules\.staging\url-parse-e45d5bd3\package.json.1317145617'
-> 'C:\Users\001091\AppData\Roaming\npm\node_modules\.staging\url-parse-e45d5bd
3\package.json'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'rename',
npm ERR! path: 'C:\\Users\\001091\\AppData\\Roaming\\npm\\node_modules\\.stagi
ng\\url-parse-e45d5bd3\\package.json.1317145617',
npm ERR! dest: 'C:\\Users\\001091\\AppData\\Roaming\\npm\\node_modules\\.stagi
ng\\url-parse-e45d5bd3\\package.json',
npm ERR! parent: '#angular/cli' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\001091\AppData\Roaming\npm-cache\_logs\2017-04-26T06_18_55
_108Z-debug.log
Unfortunately, the Angular CLI sometimes has some issues on Windows machines. Please have a look at the following thread for some possible solutions which I tried and worked: https://github.com/angular/angular-cli/issues/1349
Unable to find .angular-cli.DELETE file under C:\Users\\AppData\Roaming\npm\node_modules
hence I have deleted the entire node modules folder and did npm cache clear and then tried. it worked
I had the same issue, so I tried to install it using the node.js command prompt instead of the default one and it worked.
I hope it can help somebody else.
For me the problem was caused by running the npm install in Powershell. Running in a traditional command prompt fixed the issue.
Running Node command prompt as an administrator worked for me.
Try this (for mac users)
sudo chmod -R 777 <project-directory-name>
For example
sudo chmod -R 777 webProject1
During the install of Ghost with npm version 3.8.x, the following errors occur:
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.8
npm WARN Gonzah#0.0.1 No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\aosman\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "ghost"
npm ERR! node v4.3.2
npm ERR! npm v3.8.1
npm ERR! path D:\elastc-app\node_modules\ghost
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'D:\elastc-app\node_modules\ghost' -> 'D:\elastc-app\node_modules\.ghost.DELETE'
npm ERR! at moveAway (C:\Users\aosman\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:38:5)
npm ERR! at destStatted (C:\Users\aosman\AppData\Roaming\npm\node_modules\npm\lib\install\action\finalize.js:27:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:82:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'D:\elastc-app\node_modules\ghost' -> 'D:\elastc-app\node_modules\.ghost.DELETE'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, rename 'D:\elastc-app\node_modules\ghost' -> 'D:\elastc-app\node_modules\.ghost.DELETE'] parent: 'Gonzah' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! D:\elastc-app\npm-debug.log
After searching for a day to figure this out, it's apparently tied to a known bug in npm v3.8 (https://github.com/npm/npm/issues/10379#issuecomment-163316532).
The solution is to temporarily downgrade npm to v2 to perform the install. Do this:
npm uninstall npm -g
npm install npm#2 -g
npm install ghost
Then of course feel free to update npm to the latest version again.
I get an error when following the Angular2 5 min quick start. How can I get past it?
vagrant#vagrant-ubuntu-trusty-64:/vagrant/angular2-tutorial$ sudo npm install angular2-quickstart#1.0.0 /vagrant/angular2-tutorial
└── foxy#11.1.4 extraneous
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.6
npm WARN angular2-quickstart#1.0.0 No description
npm WARN angular2-quickstart#1.0.0 No repository field.
npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "install"
npm ERR! node v5.4.0
npm ERR! npm v3.5.2
npm ERR! path /vagrant/angular2-tutorial/node_modules/.staging/lodash-496d43d7
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename '/vagrant/angular2-tutorial/node_modules/.staging/lodash-496d43d7' -> '/vagrant/angular2-tutorial/node_modules/browser-sync/node_modules/lodash'
npm ERR! at destStatted (/usr/local/lib/node_modules/npm/lib/install/action/finalize.js:25:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:82:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename '/vagrant/angular2-tutorial/node_modules/.staging/lodash-496d43d7' -> '/vagrant/angular2-tutorial/node_modules/browser-sync/node_modules/lodash'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM: operation not permitted, rename '/vagrant/angular2-tutorial/node_modules/.staging/lodash-496d43d7' -> '/vagrant/angular2-tutorial/node_modules/browser-sync/node_modules/lodash'] parent: 'browser-sync' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "install"
npm ERR! node v5.4.0
npm ERR! npm v3.5.2
npm ERR! path npm-debug.log.727051537
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename
npm ERR! ETXTBSY: text file is busy, rename 'npm-debug.log.727051537' -> 'npm-debug.log'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /vagrant/angular2-tutorial/npm-debug.log
Here is the error log:
https://www.dropbox.com/s/xr6ha3z4re0npvi/npm-debug.log.727051537?dl=0
It looks like this is the permission issue. The npm is configured to put downloaded modules to a directory that is not authorized.
You can configure npm to install the modules to a custom directory with its prefix configuration.
Refer to following articles:
Use one of these techniques to install node and npm without having to sudo
Installing Node and npm