You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to migrate from Parcel 1 to Parcel 2 for a project I am working on. However, it doesn't seem to register any built-in node_modules as an internal dependency, such as path, buffer, url, or process. I have also added the targets to includeNodeModules as recommended here, but that still results in the same errors.
When we used the previous version of parcel it did not give any errors with built-in modules from node_modules. We did not have to include them as external dependencies.
😯 Current Behavior
Currently we get the following error for buffer, path, process, and url respectively. When we require() it doesn't recognize the modules as part of the internal node_modules.
$ npm test
Building...
× Build failed.
@parcel/core: Failed to resolve 'path' from './src/path.js'
C:\Users\Joshua\Documents\GitHub\filer\src\path.js:12:26
11 |*/
> 12 | const nodePath = require('path');>| ^^^^^^
13 | const filerPath = Object.assign({}, nodePath);
14 |
@parcel/resolver-default: External dependency "path" is not declared in package.json.
C:\Users\Joshua\Documents\GitHub\filer\package.json:49:3
48 | },
> 49 |"dependencies": {
>| ^^^^^^^^^^^^^^
50 |"buffer": "^6.0.3",
51 |"chai": "^4.3.4",
ℹ Add "path" as a dependency.
🐛 bug report
I am currently trying to migrate from Parcel 1 to Parcel 2 for a project I am working on. However, it doesn't seem to register any built-in node_modules as an internal dependency, such as
path
,buffer
,url
, orprocess
. I have also added the targets toincludeNodeModules
as recommended here, but that still results in the same errors.🎛 Configuration (.babelrc, package.json, cli command)
package.json
🤔 Expected Behavior
When we used the previous version of parcel it did not give any errors with built-in modules from node_modules. We did not have to include them as external dependencies.
😯 Current Behavior
Currently we get the following error for
buffer
,path
,process
, andurl
respectively. When werequire()
it doesn't recognize the modules as part of the internal node_modules.💁 Possible Solution
🔦 Context
💻 Code Sample
This is the branch I am currently working on: https://github.com/joshuali7536/filer/tree/issue-794
🌍 Your Environment
The text was updated successfully, but these errors were encountered: