Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run watch errors #1529

Closed
ivancunha opened this issue Dec 1, 2021 · 2 comments
Closed

npm run watch errors #1529

ivancunha opened this issue Dec 1, 2021 · 2 comments

Comments

@ivancunha
Copy link

This is getting tiring.....
Continuation of #1524

Formatted and installed everything again and it worked in the basic test.
Now I'm ready to start working and pull an all nighter.... and it's not working again....
Not the same errors as before.

I'm using git v2.15.1
And nvm with npm v10.24.1

I get the same with 1.0.1 and with 1.1.0

Running "npm install" I get this:

ivancunha@ivancunha-MacBookPro:~/Desktop/understrap-main$ npm install

nodemon@2.0.15 postinstall /home/ivancunha/Desktop/understrap-main/node_modules/nodemon
node bin/postinstall || exit 0

npm WARN bootstrap@4.6.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 592 packages from 430 contributors and audited 594 packages in 8.833s

73 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

Not installing jquery? o.0

And then after running "npm run watch"

ivancunha@ivancunha-MacBookPro:~/Desktop/understrap-main$ npm run watch

understrap@1.1.0 watch /home/ivancunha/Desktop/understrap-main
npm-run-all --parallel watch-run-*

understrap@1.1.0 watch-run-js /home/ivancunha/Desktop/understrap-main
nodemon --watch src/js/ --ext js --exec "npm-run-all js"

understrap@1.1.0 watch-run-css /home/ivancunha/Desktop/understrap-main
nodemon --watch src/sass/ --ext scss --exec "npm-run-all css"

[nodemon] 2.0.15
[nodemon] 2.0.15
[nodemon] to restart at any time, enter rs
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): src/sass//*
[nodemon] watching extensions: scss
[nodemon] watching path(s): src/js/
/*
[nodemon] watching extensions: js
[nodemon] starting npm-run-all css
[nodemon] starting npm-run-all js

understrap@1.1.0 css /home/ivancunha/Desktop/understrap-main
npm-run-all css-compile css-postcss css-minify

understrap@1.1.0 js /home/ivancunha/Desktop/understrap-main
npm-run-all js-compile js-minify

understrap@1.1.0 js-compile /home/ivancunha/Desktop/understrap-main
rollup --config src/build/rollup.config.js --sourcemap

understrap@1.1.0 css-compile /home/ivancunha/Desktop/understrap-main
sass --style expanded --source-map --embed-sources --no-error-css --quiet src/sass/theme.scss:css/theme.css src/sass/custom-editor-style.scss:css/custom-editor-style.css

/home/ivancunha/Desktop/understrap-main/src/js/bootstrap.js, /home/ivancunha/Desktop/understrap-main/src/js/skip-link-focus-fix.js, /home/ivancunha/Desktop/understrap-main/src/js/custom-javascript.js → js/theme.js...
created js/theme.js in 2.2s

understrap@1.1.0 js-minify /home/ivancunha/Desktop/understrap-main
terser --config-file src/build/terser.config.json --output js/theme.min.js js/theme.js

understrap@1.1.0 css-postcss /home/ivancunha/Desktop/understrap-main
postcss --config src/build/postcss.config.js --replace "css/.css" "!css/.rtl*.css" "!css/*.min.css"

/home/ivancunha/Desktop/understrap-main/node_modules/postcss-cli/index.js:3
import fs from 'fs-extra'
^^

SyntaxError: Unexpected identifier
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! understrap@1.1.0 css-postcss: postcss --config src/build/postcss.config.js --replace "css/*.css" "!css/*.rtl*.css" "!css/*.min.css"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the understrap@1.1.0 css-postcss 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! /home/ivancunha/.npm/_logs/2021-12-01T23_32_55_588Z-debug.log
ERROR: "css-postcss" exited with 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! understrap@1.1.0 css: npm-run-all css-compile css-postcss css-minify
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the understrap@1.1.0 css 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! /home/ivancunha/.npm/_logs/2021-12-01T23_32_55_613Z-debug.log
ERROR: "css" exited with 1.
[nodemon] app crashed - waiting for file changes before starting...
[nodemon] clean exit - waiting for changes before restart

And on this error message It talks about the log:

0 info it worked if it ends with ok
1 verbose cli [ '/home/ivancunha/.nvm/versions/node/v10.24.1/bin/node',
1 verbose cli '/home/ivancunha/.nvm/versions/node/v10.24.1/lib/node_modules/npm/bin/npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'css' ]
2 info using npm@6.14.12
3 info using node@v10.24.1
4 verbose run-script [ 'precss', 'css', 'postcss' ]
5 info lifecycle understrap@1.1.0precss: understrap@1.1.0
6 info lifecycle understrap@1.1.0
css: understrap@1.1.0
7 verbose lifecycle understrap@1.1.0css: unsafe-perm in lifecycle true
8 verbose lifecycle understrap@1.1.0
css: PATH: /home/ivancunha/.nvm/versions/node/v10.24.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ivancunha/Desktop/understrap-main/node_modules/.bin:/home/ivancunha/Desktop/understrap-main/node_modules/.bin:/home/ivancunha/.nvm/versions/node/v10.24.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ivancunha/Desktop/understrap-main/node_modules/.bin:/home/ivancunha/.nvm/versions/node/v10.24.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/ivancunha/Desktop/understrap-main/node_modules/.bin:/home/ivancunha/.nvm/versions/node/v10.24.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle understrap@1.1.0css: CWD: /home/ivancunha/Desktop/understrap-main
10 silly lifecycle understrap@1.1.0
css: Args: [ '-c', 'npm-run-all css-compile css-postcss css-minify' ]
11 silly lifecycle understrap@1.1.0css: Returned: code: 1 signal: null
12 info lifecycle understrap@1.1.0
css: Failed to exec css script
13 verbose stack Error: understrap@1.1.0 css: npm-run-all css-compile css-postcss css-minify
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/home/ivancunha/.nvm/versions/node/v10.24.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:198:13)
13 verbose stack at ChildProcess. (/home/ivancunha/.nvm/versions/node/v10.24.1/lib/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 understrap@1.1.0
15 verbose cwd /home/ivancunha/Desktop/understrap-main
16 verbose Linux 5.4.0-91-generic
17 verbose argv "/home/ivancunha/.nvm/versions/node/v10.24.1/bin/node" "/home/ivancunha/.nvm/versions/node/v10.24.1/lib/node_modules/npm/bin/npm-cli.js" "run" "css"
18 verbose node v10.24.1
19 verbose npm v6.14.12
20 error code ELIFECYCLE
21 error errno 1
22 error understrap@1.1.0 css: npm-run-all css-compile css-postcss css-minify
22 error Exit status 1
23 error Failed at the understrap@1.1.0 css script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Could this be something about permissions? On linux.... there are always permission problems...
Could this be something about an update on Linux Mint? Right after installing the SO I tested it and it worked, and a few hours later it doesn't? bah....

Thanks for any kind of help!

@bacoords
Copy link
Member

As of the latest version, we really recommend node v14 or greater (see the package.json file). In earlier versions, node v12 was also functional. I don't think your node 10 would work though.

@ivancunha
Copy link
Author

Yeah, that's what did the trick at the time, installed node v14 the LTS version and it worked :)
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants