I'm following along with Discover Sitecore's "Build Your First JSS App" video (https://www.youtube.com/watch?v=XNQGsr9_34A) and was only 2:10 in when I ran into my first issue.
All I've done so far was install jss globally using the command
npm install -g @sitecore-jss/sitecore-jss-cli
and then I created a new jss app using this command
npm init sitecore-jss react
After cd
to the new directory, I attempted to execute the command jss start
when I got the errors indicated.
> npm run start --
> [email protected] start
> cross-env-shell JSS_MODE=disconnected "npm-run-all --serial bootstrap --parallel start:react start:proxy start:watch-components"
> [email protected] bootstrap
> cross-env-shell FETCH_WITH=GraphQL "node scripts/bootstrap.js"
C:\Projects\jss-react\scripts\bootstrap.js:15
throw new Error(
^
Error: GraphQL requests to Dictionary and Layout services are not supported in disconnected mode.
at Object.<anonymous> (C:\Projects\jss-react\scripts\bootstrap.js:15:9)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
node:events:505
throw er; // Unhandled 'error' event
^
Error: spawn node scripts\bootstrap.js ENOENT
at notFoundError (C:\Projects\jss-react\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Projects\jss-react\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\Projects\jss-react\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (C:\Projects\jss-react\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn node scripts\\bootstrap.js',
path: 'node scripts\\bootstrap.js',
spawnargs: []
}
ERROR: "bootstrap" exited with 1.
node:events:505
throw er; // Unhandled 'error' event
^
Error: spawn npm-run-all --serial bootstrap --parallel start:react start:proxy start:watch-components ENOENT
at notFoundError (C:\Projects\jss-react\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Projects\jss-react\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\Projects\jss-react\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (C:\Projects\jss-react\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn npm-run-all --serial bootstrap --parallel start:react start:proxy start:watch-components',
path: 'npm-run-all --serial bootstrap --parallel start:react start:proxy start:watch-components',
spawnargs: []
}