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

test 'createMemory should have bundles' failing on Windows #9

Closed
sudo-suhas opened this issue Jul 4, 2017 · 15 comments · Fixed by #52 or #71
Closed

test 'createMemory should have bundles' failing on Windows #9

sudo-suhas opened this issue Jul 4, 2017 · 15 comments · Fixed by #52 or #71

Comments

@sudo-suhas
Copy link
Collaborator

sudo-suhas commented Jul 4, 2017

This only affects people looking to contribute to the project. Probably a windows only bug.

Edit: This section of the report is a yarn bug. Ignore.

Steps:

λ rm -rf node_modules\
λ yarn
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ npm run build

> [email protected] build E:\Projects\repos\autodll-webpack-plugin
> del-cli ./lib && babel src --out-dir lib

src\compileIfNeeded.js -> lib\compileIfNeeded.js
src\createCompiler.js -> lib\createCompiler.js
src\createConfig.js -> lib\createConfig.js
src\createLogger.js -> lib\createLogger.js
src\createMemory.js -> lib\createMemory.js
src\index.js -> lib\index.js
src\normalizeEntry.js -> lib\normalizeEntry.js
src\paths.js -> lib\paths.js
src\plugin.js -> lib\plugin.js
src\utils\fs.js -> lib\utils\fs.js
src\utils\index.js -> lib\utils\index.js
Done in 20.65s.

λ yarn test
yarn test v0.27.5
$ tape -r babel-register specs/**/*.js | faucet
module.js:487
    throw err;
    ^

Error: Cannot find module 'E:\Projects\repos\autodll-webpack-plugin\-r'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at E:\Projects\repos\autodll-webpack-plugin\node_modules\faucet\node_modules\tape\bin\tape:5:5
    at Array.forEach (native)
    at Object.<anonymous> (E:\Projects\repos\autodll-webpack-plugin\node_modules\faucet\node_modules\tape\bin\tape:4:23)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
not ok 1 no plan found
not ok 2 no assertions found
⨯ fail  2
error Command failed with exit code 1.

λ npm test

> [email protected] test E:\Projects\repos\autodll-webpack-plugin
> tape -r babel-register specs/**/*.js | faucet

module.js:487
    throw err;
    ^

Error: Cannot find module 'E:\Projects\repos\autodll-webpack-plugin\-r'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at E:\Projects\repos\autodll-webpack-plugin\node_modules\faucet\node_modules\tape\bin\tape:5:5
    at Array.forEach (native)
    at Object.<anonymous> (E:\Projects\repos\autodll-webpack-plugin\node_modules\faucet\node_modules\tape\bin\tape:4:23)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
not ok 1 no plan found
not ok 2 no assertions found
⨯ fail  2

This is probably not an issue with this library though.


If I do an npm install, the tests run but one fails:

λ npm test

> [email protected] test E:\Projects\repos\autodll-webpack-plugin
> tape -r babel-register specs/**/*.js | faucet

✓ compileIfNeeded: compile: should not call getCompiler when entry is {}
✓ compileIfNeeded: should generate files
✓ compileIfNeeded: should skip when settings equals lastSettings.json
✓ createConfig
# createMemory should have bundles

E:\Projects\repos\autodll-webpack-plugin\node_modules\memory-fs\lib\MemoryFileSystem.js:44
                        throw new MemoryFileSystemError(errors.code.EINVAL, path);
                        ^
Error
    at pathToArray (E:\Projects\repos\autodll-webpack-plugin\node_modules\memory-fs\lib\MemoryFileSystem.js:44:10)
    at MemoryFileSystem.mkdirpSync (E:\Projects\repos\autodll-webpack-plugin\node_modules\memory-fs\lib\MemoryFileSystem.js:139:13)
    at createFakeFS (E:/Projects/repos/autodll-webpack-plugin/specs/createMemory.spec.js:12:6)
    at Test.t (E:/Projects/repos/autodll-webpack-plugin/specs/createMemory.spec.js:20:14)
    at Test.bound [as _cb] (E:\Projects\repos\autodll-webpack-plugin\node_modules\tape\lib\test.js:64:32)
    at Test.run (E:\Projects\repos\autodll-webpack-plugin\node_modules\tape\lib\test.js:83:10)
    at Test.bound [as run] (E:\Projects\repos\autodll-webpack-plugin\node_modules\tape\lib\test.js:64:32)
    at Immediate.next (E:\Projects\repos\autodll-webpack-plugin\node_modules\tape\lib\results.js:71:15)
    at runCallback (timers.js:800:20)
    at tryOnImmediate (timers.js:762:5)
✓ createMemory should have bundlesiateCallback] (timers.js:733:5)
not ok 7 no plan found
⨯ fail  1
@sudo-suhas
Copy link
Collaborator Author

Opened issue upstream - yarnpkg/yarn#3827.

@sudo-suhas sudo-suhas changed the title Error: Cannot find module 'E:\Projects\repos\autodll-webpack-plugin\-r' test 'createMemory should have bundles' failing on Windows Jul 5, 2017
@sudo-suhas
Copy link
Collaborator Author

sudo-suhas commented Jul 5, 2017

This fails due to memory-fs detecting that '/my/cache/dir' which gets normalized to '\my\cache\dir\bundles' is not a valid path for windows.

Not sure how to fix this. Hopefully there's something wrong only with the test on windows and the functionality is fine.

@asfktz
Copy link
Owner

asfktz commented Jul 11, 2017

Hi, @sudo-suhas
Is this still relevant?

@sudo-suhas
Copy link
Collaborator Author

This test still fails on windows.
In addition to that, this change is completely breaking the yarn test command:

$ babel-node ./node_modules/.bin/tape specs/**/*.spec.js | faucet
E:\Projects\repos\autodll-webpack-plugin\node_modules\.bin\tape:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:533:28)
    at Module._extensions..js (module.js:580:10)
    at Object.require.extensions.(anonymous function) [as .js] (E:\Projects\repos\autodll-webpack-plugin\node_modules\babel-register\lib\node.js:152:7)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
    at Function.Module.runMain (module.js:605:10)
    at Object.<anonymous> (E:\Projects\repos\autodll-webpack-plugin\node_modules\babel-cli\lib\_babel-node.js:154:22)
not ok 1 no plan found
not ok 2 no assertions found
⨯ fail  2
error Command failed with exit code 1.

@sudo-suhas
Copy link
Collaborator Author

Made PR #38 which solves the yarn test failure on windows.

@asfktz
Copy link
Owner

asfktz commented Jul 12, 2017

You're awesome as usual, thanks!

@asfktz asfktz closed this as completed Jul 12, 2017
@sudo-suhas
Copy link
Collaborator Author

sudo-suhas commented Jul 12, 2017

Test createMemory should have bundles still fails on windows. Reopen please? Sorry for the confusion.

@asfktz asfktz reopened this Jul 12, 2017
@asfktz
Copy link
Owner

asfktz commented Jul 12, 2017

NP

@dliu120
Copy link

dliu120 commented Oct 15, 2017

I am also seeing this failure as well

@akuznetsov-gridgain
Copy link

Hi, we also need this fix!

@asfktz
Copy link
Owner

asfktz commented Nov 10, 2017

Ohhh, can't believe I let this Issue wait for so long!
@sudo-suhas, it this still relevant to the current master?

@sudo-suhas
Copy link
Collaborator Author

I'll test it tomorrow and update here.

@sudo-suhas
Copy link
Collaborator Author

As I noted in #52 (comment), the test is still failing. But now I am not sure if this is a bug in the specs or the src. See #81.

@asfktz asfktz reopened this Nov 11, 2017
@asfktz asfktz reopened this Nov 12, 2017
@AlexDel
Copy link

AlexDel commented Jan 15, 2018

Hello guys! We are looking forward for applying you cool lib on our win servers. Is there any stuff I can facilitate with investigation and devloping? We really need this fix :)

@sudo-suhas
Copy link
Collaborator Author

Hey @AlexDel, this issue was fixed sometime back but we somehow missed closing it. I am also on a Windows system so I double checked it to be sure and no tests are failing. I'll close the issue as well but if you do happen to face any issue, please open a new one.

Is there any stuff I can facilitate with investigation and devloping?

Thanks for this though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants