Choose one: 馃悰 bug report
No babel configuration, it's my first install and I just wanted to try it out.
Running parcel index.html should start the live server.
Build fails with an error about missing modules. Running pnpm install -g posthtml-parser fixed the first one, but then it complains about posthtml-render.
馃毃 Cannot find module 'posthtml-parser'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (/home/vortex/.nvm/versions/node/v8.3.0/pnpm-global/1/node_modules/.registry.npmjs.org/v8-compile-cache/1.1.0/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
at Object.<anonymous> (/home/vortex/.nvm/versions/node/v8.3.0/pnpm-global/1/node_modules/.registry.npmjs.org/parcel-bundler/1.4.0/node_modules/parcel-bundler/src/assets/HTMLAsset.js:2:15)
at Module._compile (/home/vortex/.nvm/versions/node/v8.3.0/pnpm-global/1/node_modules/.registry.npmjs.org/v8-compile-cache/1.1.0/node_modules/v8-compile-cache/v8-compile-cache.js:178:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
it seems this is as a result of pnpm not flattening dependencies.
| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.4.0
| Node | 8..3.0
| pnpm | 1.25.1
| Operating System | Peppermint 8 Linux
Same error here, by not installing parcel globally as this is an antipattern.
I suppose the reason is that parcel-bundle directly requires the following modules:
but doesn't mention them in its package.json
See pnpm/pnpm#968
I believe one should add the following lines to package.json:
"devDependencies": {
"babel-code-frame": "^6.26.0",
"babel-template": "^6.26.0",
"babel-traverse": "^6.26.0",
"babel-types": "^6.26.0",
"posthtml-parser": "^0.4.0",
"posthtml-render": "^1.1.0",
Oh, babel-template and babel-types have already been added in #727
Having the same issue. Modules that are direct dependencies should be listed as so in the package.json.
It seems this issue still exist with the version 1.12.4 of parcel :
(node:26544) UnhandledPromiseRejectionWarning: Error: Cannot find module 'babel-types'
I noticed that ./src/Asset.js requires directly babel-types whereas it's not declared as direct dependency in the package.json
@yoanthiebault - it's the same reason i'm seeing an error when tap/bin/jack.js attempt to load treport/types on line 8. (tap v14.10.8). treport/types is not declared as a dependency in package.json.