0

I'm pretty sure I'm having a trivial issue, but couldn't find anything by googling.

As per strapi docs I can generate a new app with

askar@iMac strapi % npx create-strapi-app strapi-portfolio-api --quickstart

but, for some reason, it's complaining that can't find package.json, which I think is to be generated when running the above command.

node version is v15.0.1.

askar@iMac strapi % npx create-strapi-app strapi-portfolio-api --quickstart
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/askar/code/strapi/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/askar/code/strapi/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/askar/.npm/_logs/2020-10-29T13_23_04_301Z-debug.log

2020-10-29T13_23_04_301Z-debug.log

0 verbose cli [
0 verbose cli   '/usr/local/Cellar/node/15.0.1/bin/node',
0 verbose cli   '/usr/local/lib/node_modules/npm/bin/npm-cli.js',
0 verbose cli   'exec',
0 verbose cli   '--',
0 verbose cli   'create-strapi-app',
0 verbose cli   'strapi-portfolio-api',
0 verbose cli   '--quickstart'
0 verbose cli ]
1 info using npm@7.0.3
2 info using node@v15.0.1
3 timing config:load:defaults Completed in 1ms
4 timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
5 timing config:load:builtin Completed in 1ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 1ms
8 timing config:load:file:/Users/askar/code/strapi/.npmrc Completed in 0ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:/Users/askar/.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:/usr/local/etc/npmrc Completed in 0ms
13 timing config:load:global Completed in 0ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:setUserAgent Completed in 0ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 7ms
19 verbose npm-session 4d0daea1c89041fb
20 timing npm:load Completed in 13ms
21 timing command:exec Completed in 3ms
22 verbose stack Error: ENOENT: no such file or directory, open '/Users/askar/code/strapi/package.json'
23 verbose cwd /Users/askar/code/strapi
24 verbose Darwin 19.6.0
25 verbose argv "/usr/local/Cellar/node/15.0.1/bin/node" "/usr/local/lib/node_modules/npm/bin/npm-cli.js" "exec" "--" "create-strapi-app" "strapi-portfolio-api" "--quickstart"
26 verbose node v15.0.1
27 verbose npm  v7.0.3
28 error code ENOENT
29 error syscall open
30 error path /Users/askar/code/strapi/package.json
31 error errno -2
32 error enoent ENOENT: no such file or directory, open '/Users/askar/code/strapi/package.json'
33 error enoent This
Askar
  • 5,784
  • 10
  • 53
  • 96

1 Answers1

0

After installing current recommended version of Node for Strapi, which is v14, the issue has been solved.

https://strapi.io/documentation/v3.x/getting-started/deployment.html#recommended-requirements

Node LTS (v12 or V14) Note that odd-number releases of Node will never be supported (e.g. v13, v15).

Askar
  • 5,784
  • 10
  • 53
  • 96