After creating a react application, when I run the command npm start I have the following error:
PS G:\workspace\WEB\gab-web\client> npm start
> client#0.1.0 start G:\workspace\WEB\gab-web\client
> react-scripts start
internal/modules/cjs/loader.js:628
throw e;
^
Error: No valid exports main found for 'G:\workspace\WEB\gab-web\client\node_modules\postcss-safe-parser\node_modules\postcss'
at resolveExportsTarget (internal/modules/cjs/loader.js:625:9)
at applyExports (internal/modules/cjs/loader.js:502:14)
at resolveExports (internal/modules/cjs/loader.js:551:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:657:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:960:27)
at Function.Module._load (internal/modules/cjs/loader.js:855:27)
at Module.require (internal/modules/cjs/loader.js:1033:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (G:\workspace\WEB\gab-web\client\node_modules\postcss-safe-parser\lib\safe-parse.js:1:17)
at Module._compile (internal/modules/cjs/loader.js:1144:30) {
code: 'MODULE_NOT_FOUND'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client#0.1.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\gabri\AppData\Roaming\npm-cache\_logs\2021-01-10T19_26_53_509Z-debug.log
And here's the full log file :
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start'
1 verbose cli ]
2 info using npm#6.13.4
3 info using node#v13.6.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle client#0.1.0~prestart: client#0.1.0
6 info lifecycle client#0.1.0~start: client#0.1.0
7 verbose lifecycle client#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle client#0.1.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;G:\workspace\WEB\gab-web\client\node_modules\.bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Users\gabri\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Java\jdk1.8.0_221\bin;C:\Program Files\WorldPainter;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\gabri\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\gabri\AppData\Local\Programs\Python\Python38-32\;C:\Users\gabri\AppData\Local\Microsoft\WindowsApps;C:\Users\gabri\AppData\Roaming\Dashlane\6.1937.0.23352\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Users\gabri\AppData\Roaming\Dashlane\6.1937.0.23352\ucrt;C:\Users\gabri\AppData\Roaming\Dashlane\6.1937.0.23352\bin\Qt;C:\Users\gabri\AppData\Roaming\Dashlane\6.1937.0.23352\bin\Ssl;C:\Users\gabri\AppData\Roaming\npm;D:\workspace\ffmpeg\bin;C:\Users\gabri\AppData\Local\atom\bin;C:\Users\gabri\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\gabri\AppData\Local\Microsoft\WindowsApps;C:\Users\gabri\AppData\Local\GitHubDesktop\bin
9 verbose lifecycle client#0.1.0~start: CWD: G:\workspace\WEB\gab-web\client
10 silly lifecycle client#0.1.0~start: Args: [ '/d /s /c', 'react-scripts start' ]
11 silly lifecycle client#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle client#0.1.0~start: Failed to exec start script
13 verbose stack Error: client#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:321:20)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:321:20)
13 verbose stack at maybeClose (internal/child_process.js:1028:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid client#0.1.0
15 verbose cwd G:\workspace\WEB\gab-web\client
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v13.6.0
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error client#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the client#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Try upgrading your npm to v14.5 or later, also remove react-create-app globally:
npm uninstall -g create-react-app
and then try recreating your project:
npx create-react-app myapp
It's a known issue, credits: https://github.com/facebook/create-react-app/issues/9273#issuecomment-654182223
I have faced this issue during installing node js on my system so i have tried to change the directory ( File installation ) for node js & it works...
Changed Destination:-
C:\JAVA\
Whenever you face such issues the solution related to your file path not found is because when you start a project and you stop and when you want to go back to such project . many developers tend to forget they need to change directory into the app they created . for example let me say the name of the app was clean-app and you have cleared your server out and to go back to such projects prior to using npm start , you need to cd into the directory or else it will keep stating "[] module not found" and this happen to me a few times before I remembered I had to Cd into the file, so to solve such issues , you cd into the the name of the app and then you type npm start and when you clone someones project and maybe the persons main file and and start file are different , try checking the main file and and changing the name of the main file to that of the start file in the package.json. Thanks
C:\Users\Bikram\Desktop\All works & Files\react\practice\project>npm start
project#0.1.0 start
react-scripts start
'Files\react\practice\project\node_modules.bin' is not recognized as an internal or external command,
operable program or batch file.
node:internal/modules/cjs/loader:1050
throw err;
^
Error: Cannot find module 'C:\Users\Bikram\Desktop\react-scripts\bin\react-scripts.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1047:15)
at Module._load (node:internal/modules/cjs/loader:893:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
anyone please
please solve this problem.
I had the same issue and I simply deleted tsconfig.js file and restarted npm start. Problem was solved.
Related
I'm running "npm install node-sass" from git-bash-cli in Windows 10 and getting a "'node' is not recognized as an internal or external command,
operable program or batch file." error.
I have been using this setup for years and the issues started when I upgraded node to 10.16.0
To prevent unnecessary replies:
All the questions I have seen simply say to add the path variable.
I have added Node to the PATH variable and tried a number of different ways of writing it. I ended up reinstalling Node.js and that does it automatically, so I just left it as that.
node runs from the command line, just not from scripts, like scripts in the package.json file.
I have tried reinstalling node 8.11.3, which is the version I was using before the problems started, but I get the same error. I am back to v 10.16.0 again.
Error code is as follows:
> node-sass#4.12.0 install C:\projects\true\true\website\truevue\node_modules\node-sass
> node scripts/install.js
'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#2.0.7 (node_modules\#nuxt\builder\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.12.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.12.0 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\Peter\AppData\Roaming\npm-cache\_logs\2019-07-24T23_41_06_896Z-debug.log
Here's the log when I run npm run dev on a Vue project I'm working on
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Users\\Peter\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev' ]
2 info using npm#6.10.2-next.1
3 info using node#v10.16.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle thisistrue.co#1.0.0~predev: thisistrue.co#1.0.0
6 info lifecycle thisistrue.co#1.0.0~dev: thisistrue.co#1.0.0
7 verbose lifecycle thisistrue.co#1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle thisistrue.co#1.0.0~dev: PATH: C:\Users\Peter\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\projects\true\true\website\truevue\node_modules\.bin
9 verbose lifecycle thisistrue.co#1.0.0~dev: CWD: C:\projects\true\true\website\truevue
10 silly lifecycle thisistrue.co#1.0.0~dev: Args: [ '/d /s /c',
10 silly lifecycle 'cross-env NODE_ENV=development nodemon server/index.js --watch server' ]
11 silly lifecycle thisistrue.co#1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle thisistrue.co#1.0.0~dev: Failed to exec dev script
13 verbose stack Error: thisistrue.co#1.0.0 dev: `cross-env NODE_ENV=development nodemon server/index.js --watch server`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Users\Peter\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:317:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Users\Peter\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:198:13)
13 verbose stack at maybeClose (internal/child_process.js:982:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid thisistrue.co#1.0.0
15 verbose cwd C:\projects\true\true\website\truevue
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Peter\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v10.16.0
19 verbose npm v6.10.2-next.1
20 error code ELIFECYCLE
21 error errno 1
22 error thisistrue.co#1.0.0 dev: `cross-env NODE_ENV=development nodemon server/index.js --watch server`
22 error Exit status 1
23 error Failed at the thisistrue.co#1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Finally found an answer to this.
All I ended up doing was running npm update -g and it fixed the issue
Thanks all who helped, hope this can help someone else
I think you must add the path of node.js to the system variable
First: open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables
Second: in "User variables" or "System variables" find variable PATH and add node.js folder path as value.it is C:\Program Files\nodejs;If it doesn't exists, create it.
Third: Restart your computer.
I get the following error when running npm start.
> app#0.1.0 start /Users/user/Desktop/react-tutorial
> react-scripts start
require(...) is not a function
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! app#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app#0.1.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:
Here is the actual error
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using npm#6.4.1
3 info using node#v10.15.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle app#0.1.0~prestart: app#0.1.0
6 info lifecycle app#0.1.0~start: app#0.1.0
7 verbose lifecycle app#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle app#0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/user/Desktop/react-tutorial/node_modules/.bin:/Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin:/Users/user/Library/Android/sdk/tools:/Users/user/Library/Android/sdk/platform-tools:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/opt/local/share/java/android-sdk-macosx/platform-tools:/Users/user/.android-sdk-macosx/platform-tools/:/Users/user/.android-sdk-macosx/platform-tools/:/Users/user/Library/Android/sdk/platform-tools/
9 verbose lifecycle app#0.1.0~start: CWD: /Users/user/Desktop/react-tutorial
10 silly lifecycle app#0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle app#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle app#0.1.0~start: Failed to exec start script
13 verbose stack Error: app#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:182:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:182:13)
13 verbose stack at maybeClose (internal/child_process.js:962:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
14 verbose pkgid app#0.1.0
15 verbose cwd /Users/user/Desktop/react-tutorial
16 verbose Darwin 16.7.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v10.15.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error app#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the app#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
This just started to happen when i restarted computer...why
I can't find anywhere where I am calling require()... maybe a plugin I installed?
In my case, had created a setupProxy.js file at project level, later i removed the configurations in it but not the file. Hence the mentioned error in question was thrown. To resolve, try one of the following according to your need,
update the proper configuration in the setupProxy.js
delete the setupProxy.js if not needed
don't leave the setupProxy.js as empty file
Delete nodes_modules
npm install -g npm
npm install & npm install -D
npm run start
Thanks to #Srinivas's response in the comment of the question.
Delete the generated setupProxy.js file. If you want to use a proxy, instead add it into your package.json file.
"proxy": "http://localhost:3000",
For a setupProxy.js file like so:
const proxy = require('http-proxy-middleware');
// tells the browser to direct any relative reference paths to the below
// domain instead of our own
module.exports = function(app) {
app.use(proxy('/api/*', { target: 'http://localhost:3000' }));*/
};
When you are setting up a Proxy to make a request to a different server
First Step is to install the dependency
npm install --save http-proxy-middleware
Next create setupProxy.js file
setupProxy.js
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function(app) {
app.use(
'/api',
createProxyMiddleware({
target: 'http://localhost:3001',
changeOrigin: true
})
);
};
This question already has answers here:
SyntaxError: missing ) after argument list, When using async
(3 answers)
Closed 4 years ago.
So I've been working on a full stack React app for a few months now. For some reason, seemingly out of no where, when I tried to run npm run start on the command line, it produced the following error;
// npm run start
> pair#0.1.0 start /Users/eden/Documents/GitHub/Pair./pair
> react-scripts start
/Users/eden/Documents/GitHub/Pair./pair/node_modules/react-dev-utils/WebpackDevServerUtils.js:166
compiler.hooks.done.tap('done', async stats => {
^^^^^
SyntaxError: missing ) after argument list
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/eden/Documents/GitHub/Pair./pair/node_modules/react-scripts/scripts/start.js:45:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pair#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pair#0.1.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! /Users/eden/.npm/_logs/2019-02-11T01_36_36_244Z-debug.log
I've tried the following approaches;
uninstalling/reinstalling node
uninstalling/reinstalling npm
Ensuring node and npm were version 6 or higher
deleting node_modules and package-lock.json and re-running npm-i
uninstalling/reinstalling react-scripts
downgrading react-scripts
running npm install --save react react-dom react-scripts
uninstalling/reinstalling react-dev-utils
I even tried copying/pasting contents of WebpackDevServerUtils.js in the GitHub homepage of react-dev-utils to my local node_modules/react-dev-utils/WebpackDevServerUtils.js to resolve the syntax error.
I have no idea why this is happening. Below is the log of this run;
0 info it worked if it ends with ok
1 verbose cli [ '/Users/eden/.nvm/versions/node/v6.11.2/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'start' ]
2 info using npm#6.4.1
3 info using node#v6.11.2
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle pair#0.1.0~prestart: pair#0.1.0
6 info lifecycle pair#0.1.0~start: pair#0.1.0
7 verbose lifecycle pair#0.1.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle pair#0.1.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/eden/Documents/GitHub/Pair./pair/node_modules/.bin:/Users/eden/.nvm/versions/node/v6.11.2/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/eden/.rvm/bin
9 verbose lifecycle pair#0.1.0~start: CWD: /Users/eden/Documents/GitHub/Pair./pair
10 silly lifecycle pair#0.1.0~start: Args: [ '-c', 'react-scripts start' ]
11 silly lifecycle pair#0.1.0~start: Returned: code: 1 signal: null
12 info lifecycle pair#0.1.0~start: Failed to exec start script
13 verbose stack Error: pair#0.1.0 start: `react-scripts start`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at EventEmitter.emit (events.js:191:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:891:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid pair#0.1.0
15 verbose cwd /Users/eden/Documents/GitHub/Pair./pair
16 verbose Darwin 18.2.0
17 verbose argv "/Users/eden/.nvm/versions/node/v6.11.2/bin/node" "/usr/local/bin/npm" "run" "start"
18 verbose node v6.11.2
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error pair#0.1.0 start: `react-scripts start`
22 error Exit status 1
23 error Failed at the pair#0.1.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I have looked at line 166 of WebpackDevServerUtils.js, and used ESLint to ID syntax errors and it couldn't find anything.
Consequently, my question is this: How do I resolve this obscure error?
The error seems to be on async and you are using node 6 which doesn't support async / await. Update to the latest version of node that supports it (7.6) and you should be good.
I'm working on Visual Studio 2017 using Ionic v2, I'm trying to write an app that scan beacons. But everytime I install a plugin I get errors from the npm regarding the versions of node and npm itself.
My current versions:
Cordova version: 7.0.1
Npm version: 5.0.3
Node version: 8.1.3
For example I installed cordova bluetoothle plugin and that's the error I get:
npm ERR! node v5.4.1
npm ERR! npm v3.3.4
npm ERR! code ELIFECYCLE
npm ERR! io.cordova.myappd95ddb# build: `ionic-app-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the io.cordova.myappd95ddb# build script 'ionic-app-
scripts build'.
npm ERR! This is most likely a problem with the io.cordova.myappd95ddb
package,
npm ERR! not with npm itself.
I looked on the internet but apparently there aren't many update plugins that work with bluetooth, does that mean I necessarily need to downgrade my node and npm version?
Do you know any other plugin I could use?
npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Web\\External\\Node.exe',
1 verbose cli 'C:\\Program Files (x86)\\Microsoft Visual
Studio\\2017\\Community\\Web\\External\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build',
1 verbose cli '--color=always' ]
2 info using npm#3.3.4
3 info using node#v5.4.1
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle io.cordova.myappd95ddb#~prebuild: io.cordova.myappd95ddb#
6 silly lifecycle io.cordova.myappd95ddb#~prebuild: no script for prebuild, continuing
7 info lifecycle io.cordova.myappd95ddb#~build: io.cordova.myappd95ddb#
8 verbose lifecycle io.cordova.myappd95ddb#~build: unsafe-perm in lifecycle true
9 verbose lifecycle io.cordova.myappd95ddb#~build: PATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\npm\bin\node-gyp-bin;C:\Users\giuli\Documents\Visual Studio 2017\Projects\test\test\node_modules\.bin;.\node_modules\.bin;C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\COMMUNITY\Web\External;C:\Program Files\Java\jdk1.7.0_79\bin;C:\Program Files\Git\cmd;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\MATLAB\R2016a\runtime\win64;C:\Program Files\MATLAB\R2016a\bin;C:\Program Files (x86)\PuTTY\;C:\Program Files\nodejs\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Users\giuli\AppData\Local\Microsoft\WindowsApps;C:\Users\giuli\AppData\Roaming\npm;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\cmd;C:\Program Files\nodejs
10 verbose lifecycle io.cordova.myappd95ddb#~build: CWD: C:\Users\giuli\Documents\Visual Studio 2017\Projects\test\test
11 silly lifecycle io.cordova.myappd95ddb#~build: Args: [ '/d /s /c', 'ionic-app-scripts build' ]
12 silly lifecycle io.cordova.myappd95ddb#~build: Returned: code: 1 signal: null
13 info lifecycle io.cordova.myappd95ddb#~build: Failed to exec build script
14 verbose stack Error: io.cordova.myappd95ddb# build: `ionic-app-scripts build`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\npm\lib\utils\lifecycle.js:233:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:821:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid io.cordova.myappd95ddb#
16 verbose cwd C:\Users\giuli\Documents\Visual Studio 2017\Projects\test\test
17 error Windows_NT 10.0.15063
18 error argv "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Web\\External\\Node.exe" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Web\\External\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" "--color=always"
19 error node v5.4.1
20 error npm v3.3.4
21 error code ELIFECYCLE
22 error io.cordova.myappd95ddb# build: `ionic-app-scripts build`
22 error Exit status 1
23 error Failed at the io.cordova.myappd95ddb# build script 'ionic-app-scripts build'.
23 error This is most likely a problem with the io.cordova.myappd95ddb package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error ionic-app-scripts build
23 error You can get their info via:
23 error npm owner ls io.cordova.myappd95ddb
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Solved like this: In Vs open Tools/Options/Project and Solution/ External Web Package. Move $PATH on top of ../external.
My co-worker told me to checkout a Git repo that he's been working on.
The app uses NodeJS. I did "git clone" and then "npm install". My co-worker told me to then run "npm start". I tried this and I got an error. We decided the problem was my old version of Node. He was running with version 4 and I was way back on 0.6.
So I upgraded. I am on a Mac. I uninstalled Node using Homebrew, then re-installed Node using Homebrew.
Now:
node -v
v6.5.0
So now I do "npm install" and then "npm start". Now I get a different error:
npm start
> api-reference#0.0.1 start /Users/lLRK9/projects/zeria/api
> node server.js
module.js:457
throw err;
^
Error: Cannot find module './config/manifest.json'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/lLRK9/projects/zeria/api/server.js:5:18)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.5.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! api-reference#0.0.1 start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the api-reference#0.0.1 start script 'node server.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 api-reference package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs api-reference
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls api-reference
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/lLRK9/projects/zeria/api/npm-debug.log
cat /Users/lLRK9/projects/zeria/api/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/6.5.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'start' ]
2 info using npm#3.10.3
3 info using node#v6.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle api-reference#0.0.1~prestart: api-reference#0.0.1
6 silly lifecycle api-reference#0.0.1~prestart: no script for prestart, continuing
7 info lifecycle api-reference#0.0.1~start: api-reference#0.0.1
8 verbose lifecycle api-reference#0.0.1~start: unsafe-perm in lifecycle true
9 verbose lifecycle api-reference#0.0.1~start: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/lLRK9/projects/zeria/api/node_modules/.bin:/usr/local/Cellar/node/6.5.0/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Cellar/node/6.5.0/bin/node:/usr/local/bin/brew:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/mysql/bin
10 verbose lifecycle api-reference#0.0.1~start: CWD: /Users/lLRK9/projects/zeria/api
11 silly lifecycle api-reference#0.0.1~start: Args: [ '-c', 'node server.js' ]
12 silly lifecycle api-reference#0.0.1~start: Returned: code: 1 signal: null
13 info lifecycle api-reference#0.0.1~start: Failed to exec start script
14 verbose stack Error: api-reference#0.0.1 start: `node server.js`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:242:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid api-reference#0.0.1
16 verbose cwd /Users/lLRK9/projects/zeria/api
17 error Darwin 15.6.0
18 error argv "/usr/local/Cellar/node/6.5.0/bin/node" "/usr/local/bin/npm" "start"
19 error node v6.5.0
20 error npm v3.10.3
21 error code ELIFECYCLE
22 error api-reference#0.0.1 start: `node server.js`
22 error Exit status 1
23 error Failed at the api-reference#0.0.1 start script 'node server.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the api-reference package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error node server.js
23 error You can get information on how to open an issue for this project with:
23 error npm bugs api-reference
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls api-reference
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
This app works for my co-worker. What differences in our setups might allow this app to work for him, but not for me?
Error: Cannot find module './config/manifest.json'
This looks like some local config file you're missing. You should ask him for it.
Alternatively, if there is an install hook in the package.json of the module, it may be attempting to configure this manifest.json file automatically, and it's possible that install script failed. You should check if there is any custom install hook as well.
(Also, I'd recommend using n in the future for managing Node.js versions).