question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot resolve dependency '_process'

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
justinwoocommented, May 6, 2018

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#L14

Running Parcel on both the normal commonJS /output and a built bundle (not through pulp browserify) has been working well for me for a long time now 👍

1reaction
davidnaglicommented, Feb 2, 2018

@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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found