← All tasks
javascriptpreactjs/wmr #506Not a task: not reproduced

npm init wmr fails

envgap__preactjs__wmr-506

Original GitHub issue ↗Opened 2021-03-30

01 / FAILURE SIGNATURE

As reported upstream

`npm init wmr projectname` fails with error "Cannot find module string_decoder/"
Not a benchmark task.
  • No curated issue-specific recipe or verified environment fix is available.

02 / ENVIRONMENT RECIPE

Base commit
Not freshly verified
Manifest
package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

preactjs/wmr #506 · read the original issue
<!--

  For usage questions consider using https://github.com/preactjs/wmr/discussions

-->



**Describe the bug**



`npm init wmr projectname` fails with error "Cannot find module string_decoder/"



**To Reproduce**

Steps to reproduce the behavior:

1. run `npm init wmr myprojectname` in terminal



**Expected behavior**



Project structure gets initialised.



**Desktop (please complete the following information):**

 - OS: Ubuntu 20.04

 - Browser: n/a

 - WMR Version n/a



**Additional context**



```console

$ npm init wmr dashboard-preact-typescript

Need to install the following packages:

  create-wmr

Ok to proceed? (y) y

internal/modules/cjs/loader.js:883

  throw err;

  ^



Error: Cannot find module 'string_decoder/'

Require stack:

- /home/jazg/.npm/_npx/3c66316f091b0520/node_modules/create-wmr/dist/index.js

    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)

    at Function.Module._load (internal/modules/cjs/loader.js:725:27)

    at Module.require (internal/modules/cjs/loader.js:952:19)

    at require (internal/modules/cjs/helpers.js:88:18)

    at Object.<anonymous> (/home/jazg/.npm/_npx/3c66316f091b0520/node_modules/create-wmr/dist/index.js:2:194)

    at Module._compile (internal/modules/cjs/loader.js:1063:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

    at Module.load (internal/modules/cjs/loader.js:928:32)

    at Function.Module._load (internal/modules/cjs/loader.js:769:14)

    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {

  code: 'MODULE_NOT_FOUND',

  requireStack: [

    '/home/jazg/.npm/_npx/3c66316f091b0520/node_modules/create-wmr/dist/index.js'

  ]

}

npm ERR! code 1

npm ERR! path /home/jazg/work/learn

npm ERR! command failed

npm ERR! command sh -c create-wmr "dashboard-preact-typescript"



npm ERR! A complete log of this run can be found in:

npm ERR!     /home/jazg/.npm/_logs/2021-03-30T17_10_10_352Z-debug.log

```



[2021-03-30T17_10_10_352Z-debug.log](https://github.com/preactjs/wmr/files/6230910/2021-03-30T17_10_10_352Z-debug.log)

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]

Issue-specific recipe and runtime smoke command require review against the complete issue and repository.

Legacy reproduction is generic install-only; match the actual issue failure before admission.