Replies: 1 comment 3 replies
-
How did you install the dependencies? and how are you running the build? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have projects built with next that have been dormant for a month or two. I went to build them today and the next build fails with:
(node:4268) UnhandledPromiseRejectionWarning: Error: Cannot find module 'ts-pnp'
To Reproduce
I had the same results in a completely bare bones project with only one single file - a package.json file and the following contents:
{
"scripts": {
"build": "next build"
},
"dependencies": {
"express": "^4.17.1",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"next": "^9.3.5"
}
}
If I run npm run build, I get the following output:
(node:15092) UnhandledPromiseRejectionWarning: Error: Cannot find module 'ts-pnp'
Require stack:
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:794:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Module.require (internal/modules/cjs/loader.js:849:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (C:\TestNext\node_modules\pnp-webpack-plugin\index.js:2:29)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:849:19)
(node:15092) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:15092) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Expected behavior
A successful build
Screenshots
System information
Windows 10
Visual Studio Code
npm version 6.12.0,
Next.js v 9.3,
Node.js v12.13
Additional context
I sure would appreciate any insight anyone can give me. I'm in a bit of a pickle here!
I'm not sure why this is suddenly happening and Google turns up nothing. Sure seems like it's got something to do with Typescript, as it's the ts-pnp. It's also pointing at pnp-webpack-plugin. I'll be honest and say I don't really know what either of those are - or how webpack works. I have been successfully experimenting with Typescript in non-Next projects and installed Nodemon, etc. But the only global packages I have installed, from what I can tell are from this command:
npm list -g -depth=0
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]
Beta Was this translation helpful? Give feedback.
All reactions