The "path" argument must be of type string or an instance of Buffer or URL (`react-dom`)
See original GitHub issueWhat version of Next.js are you using?
12.0.5-canary.0-12.0.8-canary.20
What version of Node.js are you using?
14.17.0
What browser are you using?
Irrelevant
What operating system are you using?
Windows
How are you deploying your application?
Irrelevant
Describe the Bug
I updated next.js
from v12.0.4 to v12.0.5-canary.0 and I got a compiling error from react-dom
.
Expected Behavior
No error
To Reproduce
yarn init -y
yarn set version berry
yarn add next@canary react react-dom
- Create
pages
folder - Create
next.config.js
file ( reason ):
module.exports = {
experimental: {
swcFileReading: false
}
}
yarn next
- Read log:
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
error - ./.yarn/__virtual__/react-dom-virtual-3cc0bffdcb/0/cache/react-dom-npm-17.0.2-f551215af1-1c1eaa3bca.zip/node_modules/react-dom/cjs/react-dom.development.js
Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received type number (-2147483494)
at new Promise (<anonymous>)
wait - compiling...
error - ./.yarn/__virtual__/react-dom-virtual-3cc0bffdcb/0/cache/react-dom-npm-17.0.2-f551215af1-1c1eaa3bca.zip/node_modules/react-dom/cjs/react-dom.development.js
Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received type number (-2147483417)
at new Promise (<anonymous>)
wait - compiling...
error - ./.yarn/__virtual__/react-dom-virtual-3cc0bffdcb/0/cache/react-dom-npm-17.0.2-f551215af1-1c1eaa3bca.zip/node_modules/react-dom/cjs/react-dom.development.js
Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received type number (-2147483417)
at new Promise (<anonymous>)
<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|C:\test-nextjs\.yarn\__virtual__\react-dom-virtual-3cc0bffdcb\0\cache\react-dom-npm-17.0.2-f551215af1-1c1eaa3bca.zip\node_modules\react-dom\cjs\react-dom.development.js': No serializer registered for NodeError
<w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> webpack/lib/ModuleBuildError -> NodeError
Issue Analytics
- State:
- Created 2 years ago
- Reactions:12
- Comments:12 (5 by maintainers)
Top Results From Across the Web
The "path" argument must be of type string or an instance ...
The "path " argument must be of type string or an instance of Buffer or URL. Received undefined · Delete node_modules folder ·...
Read more >typeerror: the "path" argument must be of type string or an ...
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined at Object.
Read more >[Fix] TypeError [ERR_INVALID_ARG_TYPE]: The “path ...
[Fix] TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined · This story will cover three possible fixes: · 1:...
Read more >React Router - URL Parameters
React Router - URL Parameters. A simple example deployed using react-codesandboxer. 2.8k. 0. 0. Edit Sandbox. Files. example.js. index.html. index.js.
Read more >Changelog
Fixed an issue with Angular Component Testing where urls within SASS/SCSS files ... parallel group parameters are mismatched when sent to the Cypress...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
“yarn add next@12.0.4” fixed it for me. Thank you!
Looks like this issue got fixed in
12.0.8-canary.21
via https://github.com/vercel/next.js/pull/32867 🎉