Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Building on windows results in faulty package #87

Closed
laggingreflex opened this issue Sep 1, 2017 · 4 comments
Closed

Building on windows results in faulty package #87

laggingreflex opened this issue Sep 1, 2017 · 4 comments
Labels

Comments

@laggingreflex
Copy link

I'm on Windows and I tried to fork it and build it myself but building results in a package that always results in this error:

path.js:28
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received null
    at assertPath (path.js:28:11)
    at join (path.js:489:7)
    at Object.<anonymous> (C:\...\test\node_modules\@std\esm\esm.js.gz:1:53077)
    at e (C:\...\test\node_modules\@std\esm\esm.js.gz:1:219)
    at C:\...\test\node_modules\@std\esm\esm.js.gz:1:576
    at Object.<anonymous> (C:\...\test\node_modules\@std\esm\esm.js.gz:1:586)
    at Module._compile (module.js:573:30)
    at Object.<anonymous> (C:\...\test\node_modules\@std\esm\index.js:14:5)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
@jdalton jdalton added the invalid label Sep 1, 2017
@jdalton
Copy link
Member

jdalton commented Sep 1, 2017

Hi @laggingreflex!

I can't repro.
I'm running Windows 10, Node 8.x, with npm 4 and able to build from the repo.

@jdalton jdalton closed this as completed Sep 1, 2017
@laggingreflex
Copy link
Author

laggingreflex commented Sep 1, 2017

I'm on node 8.4 npm 5

I compared the esm.js.gz built by me with the npm-installed version and there's a size difference: 42.6kB (mine) vs 43kB (installed) so there's definitely something weird going on at my end.

Could you could you upload your ./build/esm.js (uncompressed)? I could compare that to mine to get a better idea what's missing in my build.

Edit: Here's my version https://gist.github.com/laggingreflex/32140cf1bcdedfef6f23eaa3912f1a3e

@jdalton
Copy link
Member

jdalton commented Sep 1, 2017

The build size difference is expected since our master branch is where WIP bits are.
Are you able to npm i, npm test, and npm run test:prod successfully?

@laggingreflex
Copy link
Author

laggingreflex commented Sep 2, 2017

Tests are working, but can't use it outside the library for some reason.

Setting the package version to 0.7.1 (from 0.7.0) and then building again solves the issue! Not sure why.

I got this hint (of upgrading version) while debugging the webpack build. Somewhere the values being passed looked like this:

  map:
   { raw: [Function],
     versions: [ '0.7.0' ],
     wrappers: { '0.7.0': [Function: methodWrapper] } },
  range: '>=0.7.1 <0.8.0' }

Edit: Don't know why I had version 0.7.0 to begin with. Maybe I had switched to a previous tag while testing.

github-actions bot pushed a commit to qiwi-forks/esm that referenced this issue Apr 13, 2021
# 1.0.0 (2021-04-13)

### Bug Fixes

* upadate dependencies. fix broken tests. ([696baf9](696baf9))
* **package:** update acorn to version 5.0.0 ([standard-things#97](https://github.com/qiwi-forks/esm/issues/97)) ([aefa703](aefa703))

### Reverts

* Revert "Switch from using mtime to ctime for cache validation. [closes standard-things#746]" ([376438c](376438c)), closes [standard-things#746](https://github.com/qiwi-forks/esm/issues/746)
* Revert "Remove SafeJSON." ([5947eb4](5947eb4))
* Revert "Only hoist function declarations." ([55d92f8](55d92f8))
* Revert "Temporarily remove chakracore/latest from appveyor test matrix." ([6968f58](6968f58))
* Revert "Remove unneeded package options cloning." [closes standard-things#504] ([7c22f88](7c22f88)), closes [standard-things#504](https://github.com/qiwi-forks/esm/issues/504)
* Revert "Remove ava from tips section." ([fbe713f](fbe713f))
* Revert "Remove refDestructuringErrors references from acorn plugins." ([c89e922](c89e922))
* Revert "Allow options.generateLegacyModuleImport to force legacy module.import." ([6bf5564](6bf5564)), closes [standard-things#116](https://github.com/qiwi-forks/esm/issues/116)
* Revert "Revert ast-types/fork changes to reinstate JSX types." ([6d5d4fd](6d5d4fd)), closes [standard-things#87](https://github.com/qiwi-forks/esm/issues/87)
* Revert "Move reify to peerDependencies of Babel plugin." ([428a632](428a632))
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants