now-cli errors out when trying to start local development server
This content was last updated in 2021. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2020 07:12 PM
As the title states, I'm currently running into issues when I try to start a local development server in the now-cli. There are two parts to this. After I successfully create a project, I run npm install to install my dependencies. During this time I get the following error:
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:308:12)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Linux 5.8.18-200.fc32.x86_64
gyp ERR! command "/home/tdc/.nvm/versions/node/v14.15.0/bin/node" "/home/tdc/helloworld/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/tdc/helloworld/node_modules/node-sass
gyp ERR! node -v v14.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.3 (node_modules/sane/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
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":"linux","arch":"x64"})
npm WARN @webpack-blocks/babel@2.1.0 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN babel-loader@8.2.1 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN sass-loader@8.0.2 requires a peer of webpack@^4.36.0 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN enzyme-adapter-react-16@1.1.0 requires a peer of react-dom@^16.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN react-test-renderer@16.14.0 requires a peer of react@^16.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN karma-webpack@3.0.5 requires a peer of webpack@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @webpack-blocks/dev-server@1.0.0 requires a peer of webpack@2.x || 3.x but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@2.11.5 requires a peer of webpack@^2.2.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @webpack-blocks/webpack@1.0.0 requires a peer of webpack@2.x || 3.x but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@1.12.2 requires a peer of webpack@^1.0.0 || ^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.
npm WARN postcss-modules-resolve-imports@1.3.0 requires a peer of postcss@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN acorn-jsx@5.3.1 requires a peer of acorn@^6.0.0 || ^7.0.0 || ^8.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @tdc/hello-world@0.0.1 No repository field.
npm WARN @tdc/hello-world@0.0.1 No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.12.0 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! /home/tdc/.npm/_logs/2020-11-12T02_56_54_405Z-debug.log
------------------------------------------------------------------------------------------------------------------
now-cli develop issues
When I try to run the develop command (now-cli develop), I get the following:
Running component locally...
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module '/home/tdc/helloworld/node_modules/@servicenow/cli-component-archetype-dev/conf/develop/pre/run'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
[builder:builder-core:end:37371] Task: run develop:pre, Error: Command failed: sh -c node node_modules/@servicenow/cli-component-archetype-dev/conf/develop/pre/run
[builder:builder-core:end:37364] Task: run develop:trace, Error: Command failed: sh -c builder run develop:pre
------------------------------------------------------------------------------------------
It appears that after my attempt to install dependencies, I am missing @servicenow/cli-component-archetype-dev/conf/develop/pre/run' from my node modules. As a result, I get the above error message. Not sure what I'm missing here. Any help is appreciated.
Additional Info
Family version: Paris
Node version: v14.15.0
NPM version: 6.14.8
OS: Fedora Release 32
- 4,422 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2021 03:25 AM
Hey Jorg, thank you for quick reply.
Node Version:
PS C:\Users\Rameshwar\demo-project> node -v
v16.13.1
Should i uninstall the node js which is v16.13.1 and again install the exact version 12 of node ?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2021 04:19 AM
Yes, you should uninstall v16 and install v12. I have v12.22.1 and that works.