这是indexloc提供的服务,不要输入任何密码
Skip to content

Initial turborepo setup with NPM doesn't compile m1 #184

@diegochavez

Description

@diegochavez

What version of Turborepo are you using?

1.0.6

Describe the Bug

Using the CLI to create a new fresh turborepo setup can't compile with the initial boilerplate.

Expected Behavior

It should build and run but looks like some steps are missing on the NPM setup, Yarn works like charm.

To Reproduce

Use the doc cli to create a new turborepo setup with NPM

npx create-turbo@latest

name:
my-turborepo

package manager:
Select NPM

Install with NPM

cd my-turborepo

(base) ➜  my-turborepo git:(main)   npm run build


> turborepo-basic@0.0.0 build /Users/USERNAME/Documents/Projects/monorepos/my-turborepo
> turbo run build

• Running build in 5 packages
web:build: cache miss, executing abd4b87f623a255a
docs:build: cache miss, executing afd7dbb4538c1318

web:build: > web@1.0.0 build /Users/USERNAME/Documents/Projects/monorepos/my-turborepo/apps/web
web:build: > next build


docs:build: > docs@1.0.0 build /Users/USERNAME/Documents/Projects/monorepos/my-turborepo/apps/docs
docs:build: > next build

web:build: sh: next: command not found
web:build: npm ERR! code ELIFECYCLE
web:build: npm ERR! syscall spawn
web:build: npm ERR! file sh
web:build: npm ERR! errno ENOENT
web:build: npm ERR! web@1.0.0 build: `next build`
web:build: npm ERR! spawn ENOENT
web:build: npm ERR! 
web:build: npm ERR! Failed at the web@1.0.0 build script.
web:build: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
web:build: npm WARN Local package.json exists, but node_modules missing, did you mean to install?

web:build: npm ERR! A complete log of this run can be found in:
web:build: npm ERR!     /Users/USERNAME/.npm/_logs/2021-12-11T08_04_02_825Z-debug.log
web:build: Error: command finished with error: exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! turborepo-basic@0.0.0 build: `turbo run build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the turborepo-basic@0.0.0 build 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!     /Users/USERNAME/.npm/_logs/2021-12-11T08_04_02_873Z-debug.log

Log INFO

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/Users/USERNAME/.nvm/versions/node/v14.18.2/bin/node',
1 verbose cli   '/Users/USERNAME/.nvm/versions/node/v14.18.2/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build'
1 verbose cli ]
2 info using npm@6.14.15
3 info using node@v14.18.2
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle turborepo-basic@0.0.0~prebuild: turborepo-basic@0.0.0
6 info lifecycle turborepo-basic@0.0.0~build: turborepo-basic@0.0.0
7 verbose lifecycle turborepo-basic@0.0.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle turborepo-basic@0.0.0~build: PATH: /Users/USERNAME/.nvm/versions/node/v14.18.2/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/USERNAME/Documents/Projects/monorepos/my-turborepo/node_modules/.bin:/Users/USERNAME/Library/pnpm:/opt/homebrew/Caskroom/miniforge/base/bin:/opt/homebrew/Caskroom/miniforge/base/condabin:/opt/homebrew/opt/icu4c/sbin:/opt/homebrew/opt/icu4c/bin:/Users/USERNAME/.nvm/versions/node/v14.18.2/bin:/Users/USERNAME/.local/share/solana/install/active_release/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
9 verbose lifecycle turborepo-basic@0.0.0~build: CWD: /Users/USERNAME/Documents/Projects/monorepos/my-turborepo
10 silly lifecycle turborepo-basic@0.0.0~build: Args: [ '-c', 'turbo run build' ]
11 silly lifecycle turborepo-basic@0.0.0~build: Returned: code: 1  signal: null
12 info lifecycle turborepo-basic@0.0.0~build: Failed to exec build script
13 verbose stack Error: turborepo-basic@0.0.0 build: `turbo run build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/USERNAME/.nvm/versions/node/v14.18.2/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:400:28)
13 verbose stack     at ChildProcess.<anonymous> (/Users/USERNAME/.nvm/versions/node/v14.18.2/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:400:28)
13 verbose stack     at maybeClose (internal/child_process.js:1058:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)
14 verbose pkgid turborepo-basic@0.0.0
15 verbose cwd /Users/USERNAME/Documents/Projects/monorepos/my-turborepo
16 verbose Darwin 20.6.0
17 verbose argv "/Users/USERNAME/.nvm/versions/node/v14.18.2/bin/node" "/Users/USERNAME/.nvm/versions/node/v14.18.2/bin/npm" "run" "build"
18 verbose node v14.18.2
19 verbose npm  v6.14.15
20 error code ELIFECYCLE
21 error errno 1
22 error turborepo-basic@0.0.0 build: `turbo run build`
22 error Exit status 1
23 error Failed at the turborepo-basic@0.0.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions