0

I am attempting to build the starter api for the Grand Stack Starter, but it fails each time I attempt to use npm start:

>nodemon --exec babel-node src/index.js

[nodemon] 1.18.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `babel-node src/index.js`
'babel-node' is not recognized as an internal or external command,
operable program or batch file.
[nodemon] app crashed - waiting for file changes before starting...

Note, I did run npm i beforehand, and I can get other projects to run (including the UI project of the grand-stack-starter). I checked in the node_modules folder, and I indeed do not have the babel-node package, but when I to install it directly, it failed with:

> babel-node@6.5.3 postinstall [project_path]\api\node_modules\babel-node
> node message.js; sleep 10; exit 1;

internal/modules/cjs/loader.js:583
    throw err;
    ^

Error: Cannot find module '[project_path]\api\node_modules\babel-node\message.js;'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:282:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
npm WARN grand-stack-starter-api@0.0.1 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! babel-node@6.5.3 postinstall: `node message.js; sleep 10; exit 1;`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the babel-node@6.5.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I don't know if this is a problem specifically with my PC or not, but any help would be appreciated

Machine spec:

  • Fresh install of windows 10 home build 1803
  • I7-8750H
  • NPMv 6.4.1
  • Node.js v10.14.2
Kelson448
  • 316
  • 1
  • 3
  • 7

2 Answers2

0

I re-installed Node.js and deleted the node_modules folder. After that I ran npm i and now npm start functions properly. It appears that the issue was with my environment after all.

Kelson448
  • 316
  • 1
  • 3
  • 7
0

I had similar issue when I tried with my laptop. but didn't get any such error when run the provided dockerfile in a docker container. This solved all such dependency package issues for me.

techexplorer
  • 79
  • 2
  • 2
  • 8