Cannot resolve dependency '_process'
See original GitHub issueI’m using parcel with this npm script (minifying app.js from compiling PureScript to js):
"prod": "pulp browserify -O --to build/app.js && parcel build build/app.js",
It used to work without problems, but now I always get this error:
> D:\docs\purescript-halogen-template\build\app.js:12147:21: Cannot resolve dependency '_process'
12145 | PS["Main"].main();
12146 |
> 12147 | }).call(this,require('_process'))
| ^
12148 | },{"_process":1}]},{},[2]);
12149 |
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ prod: `pulp browserify -O --to build/app.js && parcel build build/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ prod 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! C:\Users\me\AppData\Roaming\npm-cache\_logs\2018-02-02T00_21_51_286Z-debug.log
Any idea what is causing this? 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Cannot resolve dependency, but file exists #1986 - GitHub
The processing/bundling pass checks each dependency object's resolved field for an absolute path (in Bundler#resolveDep ) and uses that if it's ...
Read more >Unable to resolve dependency tree error when installing npm ...
You have dependency conflict (incorrect and potentially broken dependency) as it says, so try to run the command with --force , or --legacy-peer ......
Read more >Unknown build error, 'Cannot resolve dependency to ...
Hi, I get the following error when I am trying to build my solution. Unknown build error, 'Cannot resolve dependency to assembly 'DevExpress....
Read more >Cannot Resolve Dependency to Assembly Error Occurs
Learn how to handle the cannot resolve dependency to assembly error when working with the WPF ReportViewer.
Read more >Customizing resolution of a dependency directly
In the build script, the developer declares dependencies with the module group and name, but uses a placeholder version, for example: default ....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Late reply, but yeah, what is needed here is to use
pulp build
/purs bundle
like so: https://github.com/justinwoo/vidtracker/blob/6d651f6b5b378fe239c1a0245c92e5bc8eff8b1d/package.json#L14Running Parcel on both the normal commonJS
/output
and a built bundle (not throughpulp browserify
) has been working well for me for a long time now 👍@Boscop Parcel is a bundler itself, so there’s no need to run your project through browserify first.Can you please try running it through only Parcel, and see if you’re still getting the error when you run it directly through Parcel without browserify?