I created a client project for vue and run npm run serve,
but got this error:
Tried to reinstall node,npm, edited some PATHS, but nothing worked
Version
3.2.1
Node and OS info
Node v10.14.0/ npm 6.4.1
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'serve' ]
2 info using npm#6.4.1
3 info using node#v10.14.0
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle client#0.1.0~preserve: client#0.1.0
6 info lifecycle client#0.1.0~serve: client#0.1.0
7 verbose lifecycle client#0.1.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle client#0.1.0~serve: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/alexsexotic/Desktop/work/Test - mongod:node/client/node_modules/.bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/alexsexotic/.npm-global/bin
9 verbose lifecycle client#0.1.0~serve: CWD: /Users/alexsexotic/Desktop/work/Test - mongod:node/client
10 silly lifecycle client#0.1.0~serve: Args: [ '-c', 'vue-cli-service serve' ]
11 info lifecycle client#0.1.0~serve: Failed to exec serve script
12 verbose stack Error: client#0.1.0 serve: `vue-cli-service serve`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:182:13)
12 verbose stack at maybeClose (internal/child_process.js:962:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
13 verbose pkgid client#0.1.0
14 verbose cwd /Users/alexsexotic/Desktop/work/Test - mongod:node/client
15 verbose Darwin 17.2.0
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "serve"
17 verbose node v10.14.0
18 verbose npm v6.4.1
19 error file sh
20 error code ELIFECYCLE
21 error errno ENOENT
22 error syscall spawn
23 error client#0.1.0 serve: `vue-cli-service serve`
23 error spawn ENOENT
24 error Failed at the client#0.1.0 serve script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
You may check your current cli installation and maybe reinstall your vue-cli. Basically, an npx command runs within your project directory. So running npx [whatever] will always use modules installed within your project itself while npm run [whatever] may refer to some globally installed dependencies.
That said, you might also try using yarn. In the past I've also had some trouble running vue-cli through npm so I switched to yarn.
However I can not help you regarding your index.html problem since this may be another issue. But if you've bootstrapped a fresh vue project throughout vue-cli, it should work.
You can try this:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
It's work for me.
Related
I'm a graphic student trying to learn something further than classic HTML/CSS.
I want to build the default Next.js app, which you can get by npm create-next-app filename.
It certainly works when npm run dev. I can see the index page on localhost:3000.
But npm run build gets:
% npm run build
> test#0.1.0 build /Users/minori/Documents/portfolio/test
> next build
info - Checking validity of types
Failed to compile.
./pages/index.js
8:7 Error: Missing "key" prop for element in array react/jsx-key
/*almost same messages repeated for every line*/
63:13 Error: Missing "key" prop for element in array react/jsx-key
info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test#0.1.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the test#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! /Users/minori/.npm/_logs/2022-02-25T17_53_21_317Z-debug.log
And here is the debug log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm#6.14.15
3 info using node#v14.17.6
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle test#0.1.0~prebuild: test#0.1.0
6 info lifecycle test#0.1.0~build: test#0.1.0
7 verbose lifecycle test#0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle test#0.1.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/minori/Documents/portfolio/test/node_modules/.bin:/Users/minori/.npm-global/lib/node_modules/n/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/minori/bin:/opt/osxws/bin:/opt/osxws/sbin
9 verbose lifecycle test#0.1.0~build: CWD: /Users/minori/Documents/portfolio/test
10 silly lifecycle test#0.1.0~build: Args: [ '-c', 'next build' ]
11 silly lifecycle test#0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle test#0.1.0~build: Failed to exec build script
13 verbose stack Error: test#0.1.0 build: `next build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:400:28)
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:400:28)
13 verbose stack at maybeClose (internal/child_process.js:1055:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid test#0.1.0
15 verbose cwd /Users/minori/Documents/portfolio/test
16 verbose Darwin 20.3.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v14.17.6
19 verbose npm v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error test#0.1.0 build: `next build`
22 error Exit status 1
23 error Failed at the test#0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I already tried npm install -g npm-rm -rf node_modules-npm install, re-installing node.js, npm cache clear --force and rm package-lock.json.
Does anyone know what the problem is?
What else can I try now?
It's not you, there is an issue logged with eslint-plugin-react that create-next-app uses, if they haven't already done so (try npm create-next-app again) you can find eslint-plugin-react in your package.json to version 7.29.1
You can see the Vercel team noting the change and the eslint-plugin-react author's responding
https://github.com/yannickcr/eslint-plugin-react/issues/3215#issuecomment-1051115159
In my project, I'm using VueCli for the frontend. Now what I'm trying to do is deploy my project which is in remote server into the actual server. I'm using npm run build command to build the frontend first. But I can't build my project since the following error occurs again and again
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mobile-h5#0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mobile-h5#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! /Users/daisywu/.npm/_logs/2021-09-24T06_13_06_000Z-debug.log
I delete package-lock.json and node_modules,then do npm cache clean --force,then do npm install,Still unable to construct
debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm#6.14.9
3 info using node#v14.15.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle mobile-h5#0.1.0~prebuild: mobile-h5#0.1.0
6 info lifecycle mobile-h5#0.1.0~build: mobile-h5#0.1.0
7 verbose lifecycle mobile-h5#0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle mobile-h5#0.1.0~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/daisywu/Documents/mobile-h5/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle mobile-h5#0.1.0~build: CWD: /Users/daisywu/Documents/mobile-h5
10 silly lifecycle mobile-h5#0.1.0~build: Args: [ '-c', 'vue-cli-service build' ]
11 silly lifecycle mobile-h5#0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle mobile-h5#0.1.0~build: Failed to exec build script
13 verbose stack Error: mobile-h5#0.1.0 build: `vue-cli-service build`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
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:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1048:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid mobile-h5#0.1.0
15 verbose cwd /Users/daisywu/Documents/mobile-h5
16 verbose Darwin 20.3.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v14.15.3
19 verbose npm v6.14.9
20 error code ELIFECYCLE
21 error errno 1
22 error mobile-h5#0.1.0 build: `vue-cli-service build`
22 error Exit status 1
23 error Failed at the mobile-h5#0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Please help thank you
The reason is insufficient memory. Update the answer for your reference
Written in package.json
"build": "node --max_old_space_size=4096 node_modules/#vue/cli-service/bin/vue-cli-service.js build --mode development"
do npm run build
Trying to compile theme (named foo) in Prestashop:
cd themes/foo/_dev
npm run build
Get the following error.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! prestashop-classic-dev-tools#1.0.0 build: `webpack`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the prestashop-classic-dev-tools#1.0.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! /root/.npm/_logs/2021-07-02T05_58_35_445Z-debug.log
Here is the log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'run', 'build' ]
2 info using npm#6.14.13
3 info using node#v14.17.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle prestashop-classic-dev-tools#1.0.0~prebuild: prestashop-classic-dev-tools#1.0.0
6 info lifecycle prestashop-classic-dev-tools#1.0.0~build: prestashop-classic-dev-tools#1.0.0
7 verbose lifecycle prestashop-classic-dev-tools#1.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle prestashop-classic-dev-tools#1.0.0~build: PATH: /usr/lib/node_modules/npm/node_mod$
9 verbose lifecycle prestashop-classic-dev-tools#1.0.0~build: CWD: /var/www/html/themes/foo$
10 silly lifecycle prestashop-classic-dev-tools#1.0.0~build: Args: [ '-c', 'webpack' ]
11 silly lifecycle prestashop-classic-dev-tools#1.0.0~build: Returned: code: 2 signal: null
12 info lifecycle prestashop-classic-dev-tools#1.0.0~build: Failed to exec build script
13 verbose stack Error: prestashop-classic-dev-tools#1.0.0 build: `webpack`
13 verbose stack Exit status 2
13 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle$
13 verbose stack at EventEmitter.emit (events.js:376:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle$
13 verbose stack at ChildProcess.emit (events.js:376:20)
13 verbose stack at maybeClose (internal/child_process.js:1055:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid prestashop-classic-dev-tools#1.0.0
15 verbose cwd /var/www/html/themes/foo/_dev
16 verbose Linux 5.8.0-59-generic
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "build"
18 verbose node v14.17.0
19 verbose npm v6.14.13
20 error code ELIFECYCLE
21 error errno 2
22 error prestashop-classic-dev-tools#1.0.0 build: `webpack`
22 error Exit status 2
23 error Failed at the prestashop-classic-dev-tools#1.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
npm version is:
> npm -v
6.14.13
What could be the cause?
Cause of the issue not found. Resolved with the following commands:
Clean npm cache
> npm cache clean --force
Remove node modules
> rm -rf node_modules package-lock.json
Install npm
> npm install
Run build
> npm run build
I'm having trouble figuring out the issue while packaging Smart Contract on the IBM Blockchain Platform on Visual Studio Code. I installed the following:
Node.js v14.16.0
npm 6.14.11
Docker version 19.03.13, build cd8016b6bc
docker-compose version 1.25.5, build unknown
I successfully create a new smart contract project. When I ram command - package open project in Command Pallete.
I received this error message:
> Executing task in folder demoContract: npm run build <
> demoContract#0.0.1 build /home/shubham14/Desktop/Major project - blockchain/demoContract
> tsc
sh: 1: tsc: not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! demoContract#0.0.1 build: `tsc`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the demoContract#0.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! /home/shubham14/.npm/_logs/2021-03-03T11_38_29_505Z-debug.log
The terminal process "/bin/bash '-c', 'npm run build'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
**Debug-log :**
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm#6.14.11
3 info using node#v14.16.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle demoContract#0.0.1~prebuild: demoContract#0.0.1
6 info lifecycle demoContract#0.0.1~build: demoContract#0.0.1
7 verbose lifecycle demoContract#0.0.1~build: unsafe-perm in lifecycle true
8 verbose lifecycle demoContract#0.0.1~build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/shubham14/Desktop/Major project - blockchain/demoContract/node_modules/.bin:/home/shubham14/Desktop/jdk-14/bin:/home/shubham14/anaconda3/lib/graphviz:/home/apache-maven-3.6.3/bin:/home/shubham14/anaconda3/bin:/home/shubham14/anaconda3/condabin:/home/shubham14/jdk-14_linux-x64_bin/jdk-14/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle demoContract#0.0.1~build: CWD: /home/shubham14/Desktop/Major project - blockchain/demoContract
10 silly lifecycle demoContract#0.0.1~build: Args: [ '-c', 'tsc' ]
11 info lifecycle demoContract#0.0.1~build: Failed to exec build script
12 verbose stack Error: demoContract#0.0.1 build: `tsc`
12 verbose stack spawn ENOENT
12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
12 verbose stack at ChildProcess.emit (events.js:315:20)
12 verbose stack at maybeClose (internal/child_process.js:1048:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
13 verbose pkgid demoContract#0.0.1
14 verbose cwd /home/shubham14/Desktop/Major project - blockchain/demoContract
15 verbose Linux 5.4.0-42-generic
16 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
17 verbose node v14.16.0
18 verbose npm v6.14.11
19 error code ELIFECYCLE
20 error syscall spawn
21 error file sh
22 error errno ENOENT
23 error demoContract#0.0.1 build: `tsc`
23 error spawn ENOENT
24 error Failed at the demoContract#0.0.1 build script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]
Try running npm install first (and maybe even reloading VS Code afterwards).
I know this is the most common issue with Testcafe, but I previously posted questions and solutions doesn't match/work to resolve my issue. Testcafe version 1.8.4, with allure reporting. I have configured few test suites running sequential in my project but, after first suite run Testcafe terminates with the following error and aborts the test run.
npm ERR! code ELIFECYCLE
npm ERR! errno 4
npm ERR! user-journey-tests#1.0.0 test:appjourneys:azure: `TARGET_ENV=test DATA_CENTER=azwus2 testcafe 'chromium:headless:emulation' './journeys/app-journeys/*-spec.js' -r allure`
npm ERR! Exit status 4
npm ERR!
npm ERR! Failed at the user-journey-tests#1.0.0 test:appjourneys:azure 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/Venkat/.npm/_logs/2020-05-27T03_13_43_108Z-debug.log
Below is the debug log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/Cellar/node/12.10.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'test:appjourneys:azure'
1 verbose cli ]
2 info using npm#6.11.3
3 info using node#v12.10.0
4 verbose run-script [
4 verbose run-script 'pretest:appjourneys:azure',
4 verbose run-script 'test:appjourneys:azure',
4 verbose run-script 'posttest:appjourneys:azure'
4 verbose run-script ]
5 info lifecycle user-journey-tests#1.0.0~pretest:appjourneys:azure: user-journey-tests#1.0.0
6 info lifecycle user-journey-tests#1.0.0~test:appjourneys:azure: user-journey-tests#1.0.0
7 verbose lifecycle user-journey-tests#1.0.0~test:appjourneys:azure: unsafe-perm in lifecycle true
8 verbose lifecycle user-journey-tests#1.0.0~test:appjourneys:azure: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/Venkat/GAP/store-service/user-journeys-testcafe/node_modules/.bin:/usr/local/Cellar/maven/3.6.0/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Cellar/maven/3.6.0/bin:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin
9 verbose lifecycle user-journey-tests#1.0.0~test:appjourneys:azure: CWD: /Users/Venkat/GAP/store-service/user-journeys-testcafe
10 silly lifecycle user-journey-tests#1.0.0~test:appjourneys:azure: Args: [
10 silly lifecycle '-c',
10 silly lifecycle "TARGET_ENV=test DATA_CENTER=azwus2 testcafe 'chromium:headless:emulation' './journeys/app-journeys/*-spec.js' -r allure"
10 silly lifecycle ]
11 silly lifecycle user-journey-tests#1.0.0~test:appjourneys:azure: Returned: code: 4 signal: null
12 info lifecycle user-journey-tests#1.0.0~test:appjourneys:azure: Failed to exec test:appjourneys:azure script
13 verbose stack Error: user-journey-tests#1.0.0 test:appjourneys:azure: `TARGET_ENV=test DATA_CENTER=azwus2 testcafe 'chromium:headless:emulation' './journeys/app-journeys/*-spec.js' -r allure`
13 verbose stack Exit status 4
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:209: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:209:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid user-journey-tests#1.0.0
15 verbose cwd /Users/Venkat/GAP/store-service/user-journeys-testcafe
16 verbose Darwin 17.7.0
17 verbose argv "/usr/local/Cellar/node/12.10.0/bin/node" "/usr/local/bin/npm" "run" "test:appjourneys:azure"
18 verbose node v12.10.0
19 verbose npm v6.11.3
20 error code ELIFECYCLE
21 error errno 4
22 error user-journey-tests#1.0.0 test:appjourneys:azure: `TARGET_ENV=test DATA_CENTER=azwus2 testcafe 'chromium:headless:emulation' './journeys/app-journeys/*-spec.js' -r allure`
22 error Exit status 4
23 error Failed at the user-journey-tests#1.0.0 test:appjourneys:azure script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 4, true ]
I tried the following:
npm -clean install
update testcafe to latest version 1.8.4 3.
I merged my suite in to one single npm run <cmd> - This helps to run the tests but still the error continues to show up at the end and build status is unstable. Any thoughts how to over come this?
I see the following error in the NPM log:
Error: user-journey-tests#1.0.0 test:appjourneys:azure: \\`TARGET_ENV=test DATA_CENTER=azwus2 testcafe 'chromium:headless:emulation' './journeys/app-journeys/*-spec.js' -r allure\\`
Exit status 4
at EventEmitter.<anonymous>
It means that TestCafe finished tests with exit code 4.
TestCafe finishes with a non-zero exit code when some tests fail during your test session. In this particular case, 4 tests failed.
If you want to disable test failure indication via exit codes, you can append || exit 0 to the TestCafe command.