Shortform:
While using 'Angular' for the first time I run in an Error telling me that tsc hasn't been found (package.json at the end).
Detail:
I am new to Angular and while I started an example from a book with
npm start I run in an Error with my package.json file. tsc: not found Error
sh: 1: tsc: not found
npm ERR! blog-app#1.0.0 start: `tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server" `
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the blog-app#1.0.0 start script.
npm ERR! This is most likely a problem with the blog-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc && npm run copy:html && concurrently "npm run tsc:w" "npm run html:watch" "live-server"
npm ERR! You can get their info via:
npm ERR! npm owner ls blog-app
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.14.62-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! cwd /home/pi/webpages/3914_Zusatzmaterialien/kickstart/hello-angular
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/webpages/3914_Zusatzmaterialien/kickstart/hello-angular/npm-debug.log
npm ERR! not ok code 0
I was supposed to run npm install in the directory of that distribution causing the follow error:
(node:1635) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm WARN package.json blog-app#1.0.0 No README data
npm WARN deprecated typings#1.0.4: Typings is deprecated in favor of NPM #types -- see README for more information
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 4.14.62-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/webpages/angulartry
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/webpages/angulartry/npm-debug.log
npm ERR! not ok code 0
i removed it multiple times and reinstalled it with npm install -g typescript.
npm install && npm start causes the following error
(node:1814) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm WARN package.json blog-app#1.0.0 No README data
npm WARN deprecated typings#1.0.4: Typings is deprecated in favor of NPM #types -- see README for more information
npm ERR! Error: Method Not Allowed
npm ERR! at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR! at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR! at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Linux 4.14.62-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/pi/webpages/3914_Zusatzmaterialien/kickstart/hello-angular
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pi/webpages/3914_Zusatzmaterialien/kickstart/hello-angular/npm-debug.log
npm ERR! not ok code 0
If I remove tsc && from line 11
"start": "tsc && npm run copy:html
&& concurrently \"npm run tsc:w\" \"npm run html:watch\"
\"live-server\" ", , I run in the following error sh: 1:
copyfiles: not found.
About the System:
The System is running on a Raspberry Pi with Raspbian using npm version npm: '1.4.21'.
My Typescript Version seems to be 2.2.1. If it matters, I control the System from a Putty.
The package.json file:
{
"name": "blog-app",
"version": "1.0.0",
"description": "Blog Applikation",
"watch": {
"copy:html": "./app/**/*.html"
},
"scripts": {
"tsc": "./node_modules/.bin/tsc",
"tsc:w": "./node_modules/.bin/tsc --watch",
"start": "tsc && npm run copy:html && concurrently \"npm run tsc:w\" \"npm run html:watch\" \"live-server\" ",
"html:watch": "onchange \"./app/**/*.html\" -v -- npm run copy:html",
"copy:html": "copyfiles -u 1 ./app/**/*.html dist"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"#angular/common": ">=4.0.0-beta <5.0.0",
"#angular/compiler": ">=4.0.0-beta <5.0.0",
"#angular/core": ">=4.0.0-beta <5.0.0",
"#angular/forms": ">=4.0.0-beta <5.0.0",
"#angular/http": ">=4.0.0-beta <5.0.0",
"#angular/platform-browser": ">=4.0.0-beta <5.0.0",
"#angular/platform-browser-dynamic": ">=4.0.0-beta <5.0.0",
"systemjs": "0.19.27",
"core-js": "2.4.1",
"reflect-metadata": "0.1.3",
"rxjs": "5.1.0",
"zone.js": "0.8.4",
"bootstrap": "3.3.6"
},
"devDependencies": {
"canonical-path": "0.0.2",
"concurrently": "2.2.0",
"copyfiles": "1.0.0",
"http-server": "0.9.0",
"live-server": "1.1.0",
"lodash": "4.11.1",
"npm-watch": "0.1.6",
"onchange": "3.0.2",
"rimraf": "2.5.2",
"tslint": "3.7.4",
"typescript": "2.2.0",
"typings": "1.0.4"
},
"repository": {}
}
It looks like the typescript did not be installed successfully. You can try :
npm install -g typescript
And then
npm install && npm start
My advice is to generate project using angular cli and check its package.json file, it looks a bit different than yours
Related
I'm having an error whenever I try building my app with Electron.
I didn't have this issue until last week or so, It was working fine before, it suddenly stopped working.
I didn't understand the issue so I reinstalled my OS and everything on the computer, but it didn't change anything. I found some messages on the terminal telling me to install python, then VSCode with C++ for desktop applications, I did, then the error changed and I don't see any way to fix it any further.
This is my package.json, im running 'npm run build':
{
"name": "reactron",
"version": "0.1.0",
"private": true,
"dependencies": {
"#szhsin/react-menu": "^1.8.0",
"brace": "^0.11.1",
"electron-is-dev": "^1.1.0",
"fs-extra": "^10.0.0",
"gpu.js": "^2.11.4",
"gsap": "^3.4.0",
"howler": "^2.1.3",
"jsoneditor": "^9.5.6",
"jsoneditor-react": "^3.1.1",
"node-sass": "^4.14.1",
"react-draggable": "^4.4.3",
"react-json-editor-ajrm": "^2.5.13",
"react-xarrows": "^1.5.2",
"vanilla-picker": "^2.11.2"
},
"main": "public/electron.js",
"homepage": "./",
"scripts": {
"react-start": "react-scripts start",
"react-build": "react-scripts build",
"react-test": "react-scripts test --env=jsdom",
"react-eject": "react-scripts eject",
"electron-build": "electron-builder",
"build-electron": "mkdir build/src && robocopy electron build/electron /S & robocopy src/shared build/src/shared /S",
"release": "npm run react-build && electron-builder --publish=always",
"build": "npm run react-build && npm run electron-build",
"start": "concurrently \"cross-env BROWSER=none npm run react-start\" \"wait-on http://localhost:3000 && electron .\""
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"#reduxjs/toolkit": "^1.3.6",
"#testing-library/jest-dom": "^4.2.4",
"#testing-library/react": "^9.5.0",
"#testing-library/user-event": "^7.2.1",
"concurrently": "^5.1.0",
"cross-env": "^7.0.2",
"electron": "^8.1.1",
"electron-builder": "^22.13.1",
"electron-packager": "^14.2.1",
"electron-react-devtools": "^0.5.3",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-indiana-drag-scroll": "^1.8.0",
"react-redux": "^7.2.0",
"react-scripts": "^3.4.3",
"redux": "^4.0.5",
"wait-on": "^4.0.1"
},
"build": {
"asar": false
}
}
And this is the output:
> reactron#0.1.0 electron-build C:\Users\Toqu\Documents\_works\reactron
> electron-builder
• electron-builder version=22.13.1 os=10.0.19043
• loaded configuration file=package.json ("build" field)
• loaded parent configuration preset=react-cra
• description is missed in the package.json appPackageFile=C:\Users\Toqu\Documents\_works\reactron\package.json
• author is missed in the package.json appPackageFile=C:\Users\Toqu\Documents\_works\reactron\package.json
• writing effective config file=dist\builder-effective-config.yaml
• rebuilding native dependencies dependencies=gl#4.9.2, node-sass#4.14.1 platform=win32 arch=x64
• install prebuilt binary name=gl version=4.9.2 platform=win32 arch=x64 napi=
• build native dependency from sources name=gl
version=4.9.2
platform=win32
arch=x64
napi=
reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
error=prebuild-install info begin Prebuild-install version
5.3.6
prebuild-install WARN install prebuilt binaries enforced with --force!
prebuild-install WARN install prebuilt binaries may be out of date!
prebuild-install info looking for cached prebuild # C:\Users\Toqu\AppData\Roaming\npm-cache\_prebuilds\370169-gl-v4.9.2-electron-v76-win32-x64.tar.gz
prebuild-install http request GET https://github.com/stackgl/headless-gl/releases/download/v4.9.2/gl-v4.9.2-electron-v76-win32-x64.tar.gz
prebuild-install http 404 https://github.com/stackgl/headless-gl/releases/download/v4.9.2/gl-v4.9.2-electron-v76-win32-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=8.5.5 runtime=electron arch=x64
libc= platform=win32)
⨯ cannot execute cause=exit status 1
out=
> gl#4.9.2 install C:\Users\Toqu\Documents\_works\reactron\node_modules\gl
> prebuild-install || node-gyp rebuild
C:\Users\Toqu\Documents\_works\reactron\node_modules\gl>if not defined npm_config_node_gyp (node
"C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Copying C:\Users\Toqu\Documents\_works\reactron\node_modules\gl/deps/windows/dll/x64/libEGL.dll to C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\Release\libEGL.dll
1 file(s) copied.
Copying C:\Users\Toqu\Documents\_works\reactron\node_modules\gl/deps/windows/dll/x64/libGLESv2.dll to C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\Release\libGLESv2.dll
1 file(s) copied.
Copying C:\Users\Toqu\Documents\_works\reactron\node_modules\gl/deps/windows/dll/x64/d3dcompiler_47.dll to C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\Release\d3dcompiler_47.dll
1 file(s) copied.
bindings.cc
webgl.cc
procs.cc
win_delay_load_hook.cc
C:\Users\Toqu\.electron-gyp\8.5.5\include\node\v8.h(8923,39): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version. (compiling source file ..\src\native\procs.cc) [C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\webgl.vcxproj]
C:\Users\Toqu\.electron-gyp\8.5.5\include\node\v8.h(8931,42): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version. (compiling source file ..\src\native\procs.cc) [C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\webgl.vcxproj]
C:\Users\Toqu\.electron-gyp\8.5.5\include\node\v8.h(8923,39): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version. (compiling source file ..\src\native\bindings.cc) [C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\webgl.vcxproj]
C:\Users\Toqu\.electron-gyp\8.5.5\include\node\v8.h(8931,42): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version. (compiling source file ..\src\native\bindings.cc) [C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\webgl.vcxproj]
C:\Users\Toqu\.electron-gyp\8.5.5\include\node\v8.h(8923,39): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version. (compiling source file ..\src\native\webgl.cc) [C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\webgl.vcxproj]
C:\Users\Toqu\.electron-gyp\8.5.5\include\node\v8.h(8931,42): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version. (compiling source file ..\src\native\webgl.cc) [C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\webgl.vcxproj]
C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\src\native\webgl.cc(466,37): warning C4312: 'reinterpret_cast': conversion from 'GLint' to 'GLvoid *' of greater size [C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\webgl.vcxproj]
Creating library C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\Release\webgl.lib and object C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\Release\webgl.exp
webgl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class v8::BackingStore> __cdecl v8::ArrayBuffer::GetBackingStore(void)" (__imp_?GetBackingStore#ArrayBuffer#v8##QEAA?AV?$shared_ptr#VBackingStore#v8###std##XZ) referenced in function "public:
__cdecl Nan::TypedArrayContents<char>::TypedArrayContents<char>(class v8::Local<class v8::Value>)" (??0?$TypedArrayContents#D#Nan##QEAA#V?$Local#VValue#v8###v8###Z) [C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\webgl.vcxproj]
C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\Release\webgl.node : fatal error LNK1120: 1 unresolved externals [C:\Users\Toqu\Documents\_works\reactron\node_modules\gl\build\webgl.vcxproj]
errorOut=prebuild-install WARN install No prebuilt binaries found (target=8.5.5 runtime=electron arch=x64 libc= platform=win32)
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:282:12)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Toqu\Documents\_works\reactron\node_modules\gl
gyp ERR! node -v v14.18.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gl#4.9.2 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gl#4.9.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! C:\Users\Toqu\AppData\Roaming\npm-cache\_logs\2021-10-27T14_22_32_528Z-debug.log
command='C:\Program Files\nodejs\node.exe' 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js' rebuild gl#4.9.2 node-sass#4.14.1
workingDir=
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactron#0.1.0 electron-build: `electron-builder`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactron#0.1.0 electron-build 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! C:\Users\Toqu\AppData\Roaming\npm-cache\_logs\2021-10-27T14_22_32_631Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! reactron#0.1.0 build: `npm run react-build && npm run electron-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reactron#0.1.0 build 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! C:\Users\Toqu\AppData\Roaming\npm-cache\_logs\2021-10-27T14_22_32_666Z-debug.log
Does anyone know how to solve this?
I'm trying to install a Webpack and Babel to use React without CRA.
During installation webpack-dev-server, I've facing with some dependencies problems
PS C:\Users\Lebedev\Desktop\projects\frontend-graduation-project> npm install --save-dev webpack-dev-server
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: webpack#5.4.0
npm ERR! node_modules/webpack
npm ERR! peer webpack#">=2" from babel-loader#8.2.1
npm ERR! node_modules/babel-loader
npm ERR! dev babel-loader#"^8.2.1" from the root project
npm ERR! peer webpack#"^4.27.0 || ^5.0.0" from css-loader#5.0.1
npm ERR! node_modules/css-loader
npm ERR! dev css-loader#"^5.0.1" from the root project
npm ERR! 6 more (html-webpack-plugin, style-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack#"^4.0.0" from webpack-dev-middleware#3.7.2
npm ERR! node_modules/webpack-dev-server/node_modules/webpack-dev-middleware
npm ERR! webpack-dev-middleware#"^3.7.2" from webpack-dev-server#3.11.0
npm ERR! node_modules/webpack-dev-server
npm ERR! dev webpack-dev-server#"*" 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 C:\Users\Lebedev\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Lebedev\AppData\Local\npm-cache\_logs\2020-11-15T12_42_34_324Z-debug.log
PS C:\Users\Lebedev\Desktop\projects\frontend-graduation-project>
My package.json file:
"dependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"devDependencies": {
"#babel/core": "^7.12.3",
"#babel/preset-env": "^7.12.1",
"#babel/preset-react": "^7.12.5",
"babel-loader": "^8.2.1",
"css-loader": "^5.0.1",
"html-webpack-plugin": "^4.5.0",
"style-loader": "^2.0.0",
"webpack": "^5.4.0",
"webpack-cli": "^4.2.0"
}
What I already did and it still not help:
Tried remove node_modules folder
Tried remove package-lock.json file
Reinstall npm dependencies by running this command: npm install
How to solve this problems?
Thanks for any advice
I found the answer on a Github Issue page: https://github.com/npm/cli/issues/2119
My npm version has been 7.0.8. As a mvyunko mention in issue, I just type the following:
npm install npm#latest -g
npm install webpack-dev-server --save-dev
After all commands, my npm version has been changed to 6.14.8, and installation error has gone.
when I am trying to build my react app. npm run build command is failed every time. When I use npm start command everything works fine,but I can not build the app with the command.
here is my error:
PS G:\self learning\react js\resort-reactjs> npm run build
> resort#0.1.0 build G:\self learning\react js\resort-reactjs
> react-scripts build
Creating an optimized production build...
Failed to compile.
static/js/main.b4300d14.js from UglifyJs
SyntaxError: Unexpected token: operator (>) [./~/contentful/dist/contentful.node.js:3909,0]
npm ERR! Windows_NT 10.0.18362
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\USER\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
npm ERR! node v12.18.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! resort#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the resort#0.1.0 build script 'react-scripts build'.
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 resort package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! react-scripts build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs resort
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls resort
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! G:\self learning\react js\resort-reactjs\npm-debug.log
in my package.json file everything is updated. my package.json file here. :
{
"name": "resort",
"version": "0.1.0",
"private": true,
"dependencies": {
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-icons": "^3.10.0",
"react-router-dom": "^5.2.0",
"react-scripts": "0.9.5",
"styled-components": "^5.1.1"
},
"devDependencies": {},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}
The package.json file looks fine to me. I think it is a bug, or, at least, a poorly documented error. Try debug or just cleanup unwanted files that you dont need around the project and restart the build.
I was using Nodemon.js. For production i decided to delete nodemon and set script "start" to "node index.js" but now i am encountering this error. ( I have completely uninstalled nodemon from my system, deleted from dependencies, re-installed node.)
Already tried Npm cache clean --force,
Uninstalled Node multiple times
> hpgrmnode#1.0.0 start E:\Abhi\hpgrmnode
> node index.js
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js
npm ERR! file E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js
npm ERR! path E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js
npm ERR! errno ENOENT
npm ERR! hpgrmnode#1.0.0 start: `node index.js`
npm ERR! spawn E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js ENOENT
npm ERR!
npm ERR! Failed at the hpgrmnode#1.0.0 start 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! C:\Users\Mukesh\AppData\Roaming\npm-cache\_logs\2020-06-02T16_31_24_429Z-debug.log
This is log file
https://pastebin.com/EAiKbBii
Note
I have recently changed my folder name from hpgrm_node to hpgrmnode but still the path is showing for hpgrm_node
*** npm ERR! file E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js
npm ERR! path E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js
Dependencies
{
"name": "hpgrmnode",
"version": "1.0.0",
"description": "HPGRM web application",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"author": "Abhishek",
"license": "ISC",
"dependencies": {
"alert": "^5.0.0",
"bcryptjs": "^2.4.3",
"body-parser": "^1.19.0",
"connect-flash": "^0.1.1",
"connect-mongo": "^3.2.0",
"dotenv": "^8.2.0",
"edge.js": "^1.1.4",
"express": "^4.17.1",
"express-edge": "^2.0.2",
"express-fileupload": "^1.1.7-alpha.3",
"express-session": "^1.17.1",
"helmet": "^3.22.0",
"mongoose": "^5.9.16"
},
"engines": {
"node": "12.16.1"
}
}
With simple command "> node index.js"
Getting this warning
E:\Abhi\hpgrmnode>node index.js
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
And if i am trying to install nodemon
getting this error
E:\Abhi\hpgrmnode>npm install nodemon --save-dev
> nodemon#2.0.4 postinstall E:\Abhi\hpgrmnode\node_modules\nodemon
> node bin/postinstall || exit 0
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#~2.1.2 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm WARN hpgrmnode#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js
npm ERR! file E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js
npm ERR! path E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js
npm ERR! errno ENOENT
npm ERR! nodemon#2.0.4 postinstall: `node bin/postinstall || exit 0`
npm ERR! spawn E:\Abhi\hpgrm_Node\node_modules\nodemon\bin\nodemon.js ENOENT
npm ERR!
npm ERR! Failed at the nodemon#2.0.4 postinstall 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! C:\Users\Mukesh\AppData\Roaming\npm-cache\_logs\2020-06-02T16_49_22_968Z-debug.log
I want to install packages with npm:
my packages file is:
"dependencies": {
"express": "~3.3.6",
"socket.io": "0.9.16",
"jade": "~0.35.0",
"less-middleware": "~0.1.12",
"redis": "~0.8.4",
"connect-redis": "~1.4.5",
"longjohn": "~0.2.1",
"mongoose": "~3.6.20",
"json-stringify-safe": "~5.0.0"
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-uglify": "~0.2.2",
"grunt-nodemon": "~0.1.0",
"grunt-contrib-jshint": "~0.6.3",
"grunt-contrib-less": "~0.7.0",
"grunt-ngmin": "0.0.3"
}
}
but i have this error :
npm http 304 https://registry.npmjs.org/underscore.string
npm ERR! Error: No compatible version found: underscore.string#'~2.2.0rc'
npm ERR! Valid install targets:
npm ERR! ["0.9.2","1.0.0","1.1.3","1.1.4","1.1.5","1.1.6","2.0.0","2.1.0","2.1.1","2.3.0","2.3.1","2.3.2","2.2.1","2.2.0-rc","2.3.3"]
npm ERR! at installTargetsError (/usr/share/npm/lib/cache.js:685:10)
npm ERR! at /usr/share/npm/lib/cache.js:607:10
npm ERR! at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:138:7)
npm ERR! at /usr/lib/nodejs/graceful-fs/polyfills.js:133:7
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/vahid/Workspace/talkie/npm-debug.log npm
npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /home/vahid/Workspace/talkie
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.2.18
how i can fix this error? thanks!
If you have a Grunt version that has not yet applied this patch, then you will get that error due to a mistype where this line in the package.json:
underscore.string#'~2.2.0rc
Should instead be this:
underscore.string#'~2.2.0-rc
To fix this problem, use a newer version of Grunt.
in package.json change sails ">0.9"
and grunt ">0.4.1"
thats all