The Wayback Machine - https://web.archive.org/web/20200207165622/https://github.com/zeit/next.js/issues/10073
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibly error in the lingui example #10073

Closed
SilentImp opened this issue Jan 13, 2020 · 5 comments
Closed

Possibly error in the lingui example #10073

SilentImp opened this issue Jan 13, 2020 · 5 comments

Comments

@SilentImp
Copy link

@SilentImp SilentImp commented Jan 13, 2020

Bug report

Describe the bug

On https://github.com/zeit/next.js/tree/canary/examples/with-lingui
I am getting error on npm run extract

$ npm run extract

with-lingui@1.0.0 extract /with-lingui-app
lingui extract

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

Error: Cannot find module 'typescript'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/with-lingui-app/node_modules/@lingui/cli/api/extractors/typescript.js:33:19)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! with-lingui@1.0.0 extract: lingui extract
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the with-lingui@1.0.0 extract 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! /.npm/_logs/2020-01-13T16_31_36_600Z-debug.log

And log itself:

$ cat /.npm/_logs/2020-01-13T16_31_36_600Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/.nvm/versions/node/v10.15.1/bin/node',
1 verbose cli '/.nvm/versions/node/v10.15.1/bin/npm',
1 verbose cli 'run',
1 verbose cli 'extract' ]
2 info using npm@6.4.1
3 info using node@v10.15.1
4 verbose run-script [ 'preextract', 'extract', 'postextract' ]
5 info lifecycle with-lingui@1.0.0preextract: with-lingui@1.0.0
6 info lifecycle with-lingui@1.0.0
extract: with-lingui@1.0.0
7 verbose lifecycle with-lingui@1.0.0extract: unsafe-perm in lifecycle true
8 verbose lifecycle with-lingui@1.0.0
extract: PATH: /.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/with-lingui-app/node_modules/.bin:/usr/local/opt/ruby/bin:/.nvm/versions/node/v10.15.1/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle with-lingui@1.0.0extract: CWD: /with-lingui-app
10 silly lifecycle with-lingui@1.0.0
extract: Args: [ '-c', 'lingui extract' ]
11 silly lifecycle with-lingui@1.0.0extract: Returned: code: 1 signal: null
12 info lifecycle with-lingui@1.0.0
extract: Failed to exec extract script
13 verbose stack Error: with-lingui@1.0.0 extract: lingui extract
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (/.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess. (/.nvm/versions/node/v10.15.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid with-lingui@1.0.0
15 verbose cwd /with-lingui-app
16 verbose Darwin 17.7.0
17 verbose argv "/.nvm/versions/node/v10.15.1/bin/node" "/.nvm/versions/node/v10.15.1/bin/npm" "run" "extract"
18 verbose node v10.15.1
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error with-lingui@1.0.0 extract: lingui extract
22 error Exit status 1
23 error Failed at the with-lingui@1.0.0 extract script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Packages:

package-lock.json

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. npx create-next-app --example with-lingui with-lingui-app
  2. cd with-lingui-app
  3. npm i
  4. npm run extract

Expected behavior

Extracted locales

System information

  • OS: macOS
  • Version of node [10.15.1]
  • Version of Next.js: [9.1.7]

Additional context

If I am installing typescript — it actually helps.

@timneutkens

This comment has been minimized.

Copy link
Member

@timneutkens timneutkens commented Jan 14, 2020

Feel free to send a PR.

@b30wulffz

This comment has been minimized.

Copy link

@b30wulffz b30wulffz commented Jan 15, 2020

I would like to fix this.

@SilentImp

This comment has been minimized.

Copy link
Author

@SilentImp SilentImp commented Jan 16, 2020

oh … too late for me :)

@timneutkens

This comment has been minimized.

Copy link
Member

@timneutkens timneutkens commented Jan 16, 2020

Checked #10104 and there doesn't seem to be an issue with the example 🤔

@Timer Timer added the Type: Example label Feb 3, 2020
@Pegase745

This comment has been minimized.

Copy link

@Pegase745 Pegase745 commented Feb 5, 2020

I agree, TS is not a requirement in this example.

$ npm run extract
> with-lingui@1.0.0 extract /home/pegase/dev/github/next.js/examples/with-lingui
> lingui extract

Catalog statistics:
┌─────────────┬─────────────┬─────────┐
│ Language    │ Total count │ Missing │
├─────────────┼─────────────┼─────────┤
│ en (source) │      6      │    -    │
│ sv          │      6      │    0    │
└─────────────┴─────────────┴─────────┘
@timneutkens timneutkens closed this Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.