I am using below data
node - v6.11.3
npm - 3.10.10
protractor - 5.1.2
When i run the command
npm install protractor-jasmine2-screenshot-reporter --save-dev
it is displaying below error
no such file or directory, open 'C:\Users\agudla\package.json'
Full output
C:\Users\agudla>npm install protractor-jasmine2-screenshot-reporter --save-dev
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\agudla\package.json'
C:\Users\agudla
+-- UNMET PEER DEPENDENCY #angular/compiler#4.4.4
+-- protractor-jasmine2-screenshot-reporter#0.4.1
`-- UNMET PEER DEPENDENCY tslint#>= 4 < 6
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.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\agudla\package.json'
npm WARN #angular/compiler-cli#4.4.4 requires a peer of #angular/compiler#4.4.4 but none was installed.
npm WARN tslint-language-service#0.9.6 requires a peer of tslint#>= 4 < 6 but none was installed.
npm WARN agudla No description
npm WARN agudla No repository field.
npm WARN agudla No README data
npm WARN agudla No license field.
Can anyone help me how to solve this error.
you do not have any package.json file in your directory "C:\Users\agudla" .
Navigate in that directory and do a npm init which will create a package.json for you and then run npm install protractor-jasmine2-screenshot-reporter --save-dev
Refer this for more details: https://docs.npmjs.com/getting-started/creating-node-modules
Related
I'm working on a Nativescript project that needs to be converted into native Android code. I have little Nativescript experience so I'm doing a tutorial on "code sharing".
https://docs.nativescript.org/code-sharing/creating-a-new-project
I've gone through the setup and have all dependencies installed. I can confirm this with tns doctor:
✔ Getting environment information
No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 12.4.0 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 7.2.1 version and is up to date.
Then I've run the 2 mentioned commands:
$ npm i -g #nativescript/schematics
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: typescript#4.2.3
npm WARN node_modules/#nativescript/schematics/node_modules/typescript
npm WARN peer typescript#">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" from tslint#5.20.1
npm WARN node_modules/#nativescript/schematics/node_modules/tslint
npm WARN peer tslint#"^5.16.0" from #nativescript/tslint-rules#0.0.5
npm WARN node_modules/#nativescript/schematics/node_modules/#nativescript/tslint-rules
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer typescript#"^3.4.0" from #nativescript/tslint-rules#0.0.5
npm WARN node_modules/#nativescript/schematics/node_modules/#nativescript/tslint-rules
npm WARN #nativescript/tslint-rules#"~0.0.5" from #nativescript/schematics#11.0.0
npm WARN node_modules/#nativescript/schematics
changed 88 packages in 11s
12 packages are looking for funding
run `npm fund` for details
And then the second one, but the issue seems to be already in the first command:
$ ng new --collection=#nativescript/schematics hello-world --shared
⠏ Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: hello-world#0.0.0
npm ERR! Found: tslint#6.1.3
npm ERR! node_modules/tslint
npm ERR! dev tslint#"~6.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer tslint#"^5.16.0" from #nativescript/tslint-rules#0.0.5
npm ERR! node_modules/#nativescript/tslint-rules
npm ERR! dev #nativescript/tslint-rules#"~0.0.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/jclermonts/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jclermonts/.npm/_logs/2021-03-27T16_45_09_004Z-debug.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
Any help would be greatly appreciated.
This issue seems to be the same. I've also tried --force and --legacy-peer-deps
Downgrading node as suggested in this thread I could try as a last resort but the question does not answer which specific version I should downgrade to then.
npm -v
6.4.1
nvm --version
0.33.11
when I install laravel-echo (in ubuntu16.04)
npm i --save socket.io-client
I got the error warning
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN img-loader#3.0.0 requires a peer of imagemin#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ socket.io-client#2.1.1
added 26 packages from 21 contributors and audited 11731 packages in 35.934s
found 0 vulnerabilities
So I continuce to install them
npm i imagemin
But I got the itself missing error?
I want to install the imagemin but it says itself missing?
npm WARN img-loader#3.0.0 requires a peer of imagemin#^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ imagemin#6.0.0
updated 1 package and audited 12680 packages in 30.571s
found 0 vulnerabilities
I also try
$npm install -g npm-install-peers
$npm-install-peers
shows
This package doesn't seem to have any peerDependencies
npm install imagemin#^5.0.0
fixed it for me.
After upgrading from laravel 5.6 to 5.7, running npm install or npm update is giving the following error:
npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
C:\Users\Raj\Repositories\my-project
+-- ansi-regex#2.1.1 extraneous
+-- axios#0.18.0
| +-- follow-redirects#1.5.8
| | `-- debug#3.1.0
| | `-- ms#2.0.0
| `-- is-buffer#1.1.6
+-- babel-code-frame#6.26.0 extraneous
+-- babel-core#6.26.3 extraneous
+-- bootstrap#4.1.3
+-- d#1.0.0 extraneous
+-- jquery#3.3.1
+-- lodash#4.17.11
+-- popper.js#1.14.4
`-- vue#2.5.17
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.2.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN img-loader#3.0.0 requires a peer of imagemin#^5.0.0 but none was installed.
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none was installed.
npm ERR! Windows_NT 10.0.17134
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! path C:\Users\Raj\Repositories\my-project\node_modules\.staging\abbrev-954abfcd
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Raj\Repositories\my-project\node_modules\.staging\abbrev-954abfcd' -> 'C:\Users\Raj\Repositories\my-project\node_modules\abbrev'
npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:25:7)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Raj\Repositories\my-project\node_modules\.staging\abbrev-954abfcd' -> 'C:\Users\Raj\Repositories\my-project\node_modules\abbrev'
npm ERR! at Error (native)
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Raj\Repositories\my-project\node_modules\.staging\abbrev-954abfcd' -> 'C:\Users\Raj\Repositories\my-project\node_modules\abbrev'
npm ERR! at destStatted (C:\Program Files\nodejs\node_modules\npm\lib\install\action\finalize.js:25:7)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:264:29
npm ERR! at FSReqWrap.oncomplete (fs.js:123:15)
npm ERR!
npm ERR! Error: EPERM: operation not permitted, rename 'C:\Users\Raj\Repositories\my-project\node_modules\.staging\abbrev-954abfcd' -> 'C:\Users\Raj\Repositories\my-project\node_modules\abbrev'
npm ERR! at Error (native)
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\Raj\Repositories\my-project\npm-debug.log
Also when I check outdated packages with npm outdated I got the following output:
$ npm outdated
Package Current Wanted Latest Location
axios MISSING 0.18.0 0.18.0
bootstrap MISSING 4.1.3 4.1.3
jquery MISSING 3.3.1 3.3.1
laravel-mix MISSING 2.1.14 2.1.14
lodash MISSING 4.17.11 4.17.11
popper.js MISSING 1.14.4 1.14.4
vue MISSING 2.5.17 2.5.17
Why is everything missing when my project actually runs properly?
Please provide a way to solve this problem?
It is the permission problem
Navigate to the project folder and try running chmod -R 777 if you are using linux
Try removing NPM cached files from AppData -> Roaming -> npm-cache. This worked for me.
react-native-ibm-mobilefirst#8.0.2018072413 postinstall D:\Call4Code\MyTestApp
\node_modules\react-native-ibm-mobilefirst
chmod +x scripts/postinstall.sh && ./scripts/postinstall.sh
'chmod' is not recognized as an internal or external command,
operable program or batch file.
npm WARN eslint-plugin-react-native#3.2.1 requires a peer of eslint#^3.17.0 || ^
4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-native-ibm-mobilefirst#8.0.2018072413 postinstall: chmod +x scri
pts/postinstall.sh && ./scripts/postinstall.sh
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-native-ibm-mobilefirst#8.0.2018072413 postinstall s
cript.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\shalvi_kubal\AppData\Roaming\npm-cache_logs\2018-08-16T10
_34_10_364Z-debug.log
Currently there is a workaround that I used to install the react-native-ibm-mobilefirst plugin. You can create your react native project from macOS and then install the react-native-ibm-mobilefirst plugin from there, and then copy that project folder from macOS to windows. Then run 'npm install' inside the project folder and it will work fine.
I am trying to install Composer on Ubuntu 14.04. I was able to install the prerequisites. When installing composer, I get the following error. How to fix it?
npm install -g composer-cli
npm WARN deprecated fs-promise#1.0.0: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated crypto#0.0.3: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated node-uuid#1.4.8: Use uuid module instead
npm WARN deprecated jade#1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated transformers#2.1.0: Deprecated, use jstransformer
npm WARN deprecated nodemailer#2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
/root/.nvm/versions/node/v6.11.2/bin/composer -> /root/.nvm/versions/node/v6.11.2/lib/node_modules/composer-cli/cli.js
> hashtable#2.0.2 install /root/.nvm/versions/node/v6.11.2/lib/node_modules/composer-cli/node_modules/hashtable
> node-gyp configure build
sh: 1: node-gyp: Permission denied
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.2 (node_modules/composer-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! hashtable#2.0.2 install: `node-gyp configure build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the hashtable#2.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-08-22T16_31_22_412Z-debug.log
So firstly you should not install Hyperledger Composer as 'root'. You need to read the docs here before you proceed https://hyperledger.github.io/composer/installing/development-tools.html
So fundamentally this is an npm issue (in that it causes problems for npm, when you npm install as 'root' or 'sudo' privileges for installing modules).
I suggest you create a non-root user in your Ubuntu system. Then log in as that user. Then install the pre-reqs using the supplied prereqs-ubuntu.sh script from the link above. Then follow the instructions, installing as your non-privileged user.
Normal route to fixing a non-root install npm issue, is one of these shown here https://docs.npmjs.com/getting-started/fixing-npm-permissions
When you install composer modules globally (eg. composer-cli) you should install using a designated, non-root user as mentioned. If there are issues (eg, on Ubuntu with permissions to write/update node directories located in system directories like /usr/local) - one solution (but see link earlier) is perform the npm install to a directory you have access to - rather than resort to root or superuser access, as this is not good practice. Here is what to do to set the npm prefix to a given directory, ...
"npm config set prefix /home/myuser/"
In this case, global binaries are placed in /home/myuser/bin which is in your PATH, and the modules are placed in /home/myuser/lib ...