Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object-assign: no such file or directory #207

Closed
anorudes opened this issue May 7, 2016 · 21 comments
Closed

object-assign: no such file or directory #207

anorudes opened this issue May 7, 2016 · 21 comments
Labels

Comments

@anorudes
Copy link

anorudes commented May 7, 2016

Module build failed: Error: ENOENT: no such file or directory, open '/home/anoru/git/project/object-assign'

more details: babel/babel-loader#242

anorudes added a commit to anorudes/redux-easy-boilerplate that referenced this issue May 7, 2016
@simonkberg
Copy link

As mentioned in the other issue, downgrading to 8.0.2 solves it, so it seems to be related to the addition of jspm support.

@rgrove
Copy link

rgrove commented May 8, 2016

I'm also experiencing this issue. I don't use HMR, but this occurs when running my CSS and JS gulp tasks in parallel.

Running either task by itself works fine, but running them in parallel results in all sorts of module loading errors like this one. The errors are inconsistent from one run to the next, but it seems like postcss-import's jspm support is doing something that breaks module resolution for other code running in the same process. I can confirm that downgrading to 8.0.2 resolves the issue.

@MoOx
Copy link
Contributor

MoOx commented May 9, 2016

object-assign is included as a normal dependency of this package and require() reference is normal too. I guess the recent add by @swernerx broke something. @swernerx any idea?

@eugene1g
Copy link

eugene1g commented May 9, 2016

object-assign is the first dependency used in the code. There is nothing wrong with it, and it's not actually missing, but the resolution of dependencies seems to happen at the root of the userland project - and node_modules is not considered. If I symlink object-assign from node_modules/ into the root project dir, then it's found and the next dependency fails.

Not much to go on for now, sorry. I haven't even triaged whether the problem is within webpack/postcss/babel - just that the resolving issue doesn't happen with 8.1.0 and happens with 8.1.1/2

@swernerx
Copy link
Contributor

swernerx commented May 9, 2016

Puh, that looks like a though one. I am actually not sure where this is coming from.

Especially the timing / race condition / parallel related comments make me wonder what is actually happen here.

"object-assign" is not used by "pkg-resolve" at all. But as I understood it's not really related to this package but to some kind of setup of the environment (looking in the wrong paths). "pkg-resolve" uses both "jspm" and "npm" to resolve packages. Probably there is some issue that the npm resolver is not actually able to work in parallel with two different setups?

We first have to identify were this error is thrown from. Anybody has some stack trace or reproducable code fragment? I can't see it here - even when running some tasks in parallel in Gulp.

@tarikjn
Copy link

tarikjn commented May 9, 2016

Same issue, verified to happen since 8.1.1+, 8.1.0 is not affected.

meriadec pushed a commit to SIGSEV/minus that referenced this issue May 11, 2016
/!\ postcss-loader version has been fixed to 8.0.2. see:
      - postcss/postcss-import#207
      - babel/babel-loader#242
@dominictobias
Copy link

dominictobias commented May 31, 2016

Same issue with 8.1.2, even if I just require in postcss-import into my webpack (v2) config and don't use it, it breaks babel-loader:

Module build failed: Error: ENOENT: no such file or directory, open '<path>/object-assign'
        at Error (native)
    Error loading <path>/object-assign as "object-assign" from <path>/node_modules/babel-loader/index.js
 @ multi js

Edit: downgrading to 8.1.0 works

@simonkberg
Copy link

I've been trying to triage this bug for the past couple of hours, but honestly - this is the dependency tree the JSPM-integration introduces:

└─┬ [email protected] 
  └─┬ [email protected] 
    └─┬ [email protected] 
      ├── [email protected] 
      ├─┬ [email protected] 
      │ ├── [email protected] 
      │ ├── [email protected] 
      │ ├─┬ [email protected] 
      │ │ ├── [email protected] 
      │ │ ├─┬ [email protected] 
      │ │ │ └── [email protected] 
      │ │ ├── [email protected] 
      │ │ ├─┬ [email protected] 
      │ │ │ └── [email protected] 
      │ │ ├── [email protected] 
      │ │ ├─┬ [email protected] 
      │ │ │ └── [email protected] 
      │ │ ├── [email protected] 
      │ │ ├─┬ [email protected] 
      │ │ │ ├── [email protected] 
      │ │ │ ├── [email protected] 
      │ │ │ └── [email protected] 
      │ │ ├─┬ [email protected] 
      │ │ │ └── [email protected] 
      │ │ ├── [email protected] 
      │ │ └── [email protected] 
      │ ├─┬ [email protected] 
      │ │ └── [email protected] 
      │ ├─┬ [email protected] 
      │ │ ├── [email protected] 
      │ │ └── [email protected] 
      │ └─┬ [email protected] 
      │   └── [email protected] 
      ├─┬ [email protected] 
      │ ├─┬ [email protected] 
      │ │ ├── [email protected] 
      │ │ ├─┬ [email protected] 
      │ │ │ └── [email protected] 
      │ │ ├── [email protected] 
      │ │ ├── [email protected] 
      │ │ ├─┬ [email protected] 
      │ │ │ └── [email protected] 
      │ │ ├── [email protected] 
      │ │ ├─┬ [email protected] 
      │ │ │ ├── [email protected] 
      │ │ │ └── [email protected] 
      │ │ ├─┬ [email protected] 
      │ │ │ └── [email protected] 
      │ │ └── [email protected] 
      │ ├─┬ [email protected] 
      │ │ └─┬ [email protected] 
      │ │   └─┬ [email protected] 
      │ │     ├── [email protected] 
      │ │     └── [email protected] 
      │ └── [email protected] 
      ├─┬ [email protected] 
      │ ├── [email protected] 
      │ └── [email protected] 
      ├─┬ [email protected] 
      │ ├── [email protected] 
      │ ├── [email protected] 
      │ ├── [email protected] 
      │ └── [email protected] 
      ├── [email protected] 
      ├── [email protected] 
      ├─┬ [email protected] 
      │ └── [email protected] 
      ├─┬ [email protected] 
      │ ├─┬ [email protected] 
      │ │ └── [email protected] 
      │ ├─┬ [email protected] 
      │ │ └─┬ [email protected] 
      │ │   └── [email protected] 
      │ ├─┬ [email protected] 
      │ │ ├── [email protected] 
      │ │ └── [email protected] 
      │ ├─┬ [email protected] 
      │ │ └─┬ [email protected] 
      │ │   └── [email protected] 
      │ └── [email protected] 
      ├─┬ [email protected] 
      │ └── [email protected] 
      ├─┬ [email protected] 
      │ ├─┬ [email protected] 
      │ │ └─┬ [email protected] 
      │ │   └── [email protected] 
      │ ├── [email protected] 
      │ ├─┬ [email protected] 
      │ │ └── [email protected] 
      │ ├── [email protected] 
      │ └─┬ [email protected] 
      │   └─┬ [email protected] 
      │     └── [email protected] 
      └─┬ [email protected] 
        └── [email protected] 

Let's ignore the fact that jspm is a pre-release package: how many people actually use JSPM to warrant introducing this kind of change, causing many regressions for average package consumers? I'm positive one of these packages is doing something fishy, like overloading the module loading, but it's a maze to debug.

I'd say revert these changes and figure out a better way to handle the resolving of JSPM packages, if it's really actually required.

@timothyallan
Copy link

timothyallan commented Jun 9, 2016

Same issue as @dominictobias here, simply including any version > 8.1.0 in my webpack borks everything.
npm install [email protected] to the rescue for now 😟

iam4x added a commit to iam4x/futureRX that referenced this issue Jul 1, 2016
epilande added a commit to epilande/yars that referenced this issue Aug 19, 2016
Build fails on `8.1.2`, down grade to `8.0.2` postcss/postcss-import#207
izaakschroeder added a commit to webpack-config/webpack-config-postcss that referenced this issue Oct 6, 2016
This is obviously a breaking change because of the changes to the webpack API. Smoke tests have been added to ensure it works in the most basic of cases. `postcss-import` is pinned to `8.1.0` because of a breaking bug with `webpack@2`. See: postcss/postcss-import#207.
izaakschroeder added a commit to webpack-config/webpack-config-postcss that referenced this issue Oct 6, 2016
This is obviously a breaking change because of the changes to the webpack API. Smoke tests have been added to ensure it works in the most basic of cases. `postcss-import` is pinned to `8.1.0` because of a breaking bug with `webpack@2`. See: postcss/postcss-import#207.

Support for `[email protected]` is removed because `webpack@2` does not support it.
@andrewmclagan
Copy link

Still experiencing this issue... Any movement?

@drwpow
Copy link

drwpow commented Oct 18, 2016

Been sitting here, banging my head against a wall for 3 days before finding this. Was at 8.1.2; babel-loader 6.2.5.

Downgrading to 8.1.0 fixed it for me. Like @timothyallan experienced, 8.1.1 and 8.1.2 were both breaking on my system.

@RyanZim RyanZim added the bug label Nov 3, 2016
@taion
Copy link

taion commented Nov 15, 2016

I believe this is fixed by #243 on the v9 branch.

@RyanZim
Copy link
Collaborator

RyanZim commented Nov 15, 2016

@taion It should be. Have you confirmed that it is fixed?

Will try to release it soon. See the milestone: https://github.com/postcss/postcss-import/milestone/1.

@taion
Copy link

taion commented Nov 15, 2016

I haven't, but the presence of that dep was the only problem, so there's bigger problems if that doesn't fix things.

@RyanZim
Copy link
Collaborator

RyanZim commented Nov 15, 2016

@taion If it isn't asking too much, would you mind installing that branch and confirming that this is fixed there? I'm not a webpack user and I'd hate to release v9 only to discover it doesn't fix this issue.

@taion
Copy link

taion commented Nov 15, 2016

Publishing npm pre-releases is free :p but I'll take a look

@taion
Copy link

taion commented Nov 15, 2016

Appears to work for me.

@RyanZim
Copy link
Collaborator

RyanZim commented Nov 16, 2016

Great, thanks! Going to leave this open until v9 is shipped to avoid dupes.

@dominictobias
Copy link

dominictobias commented Nov 16, 2016

Thanks for the fix look forward to unpinning the version :)

@axe312ger
Copy link

I can confirm, the v9 branch does fix the problem

yarn add --dev git+https://github.com/postcss/postcss-import.git#v9-dev

@RyanZim
Copy link
Collaborator

RyanZim commented Dec 3, 2016

v9 is shipped! 🎉 You should no longer encounter this error with the latest version.

@RyanZim RyanZim closed this as completed Dec 3, 2016
RayDev1988 added a commit to RayDev1988/React-Redux_Boilderplate that referenced this issue Mar 9, 2022
RaymondDev1988 added a commit to RaymondDev1988/redux-easy-boilerplate that referenced this issue Mar 16, 2022
AllTwinkleStars added a commit to AllTwinkleStars/redux_boilerplate that referenced this issue May 23, 2023
dragonfighterss added a commit to dragonfighterss/-redux-easy-boilerplate that referenced this issue Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests