Error: Cannot find module 'AsyncDependencyToInitialChunkWarning' - node.js

I have succesfully installed and deployed to my Debian production server a react app using "create-react-app". I've then pushed it to my repo and pulled it on my development computer (Win10). Here's the output for npm install && npm start
C:\Users\Shad\shadfront>npm install
[ ...........] / extract:webpack-manifest-plugin: verb lock using C:\Users\Shad\AppDat
[ ...........] / extract:webpack-manifest-plugin: verb lock using C:\Users\Shad\AppDa
[ ...........] / extract:webpack-manifest-plugin: verb lock using C:\Users\Shad\AppD
[ ...........] / extract:webpack-manifest-plugin: verb lock using C:\Users\Shad\AppData[ ...........] / extract
:webpack-manifest-plugin: verb lock using C:\Users\Shad\A[ ...........] / extract:webpack-manifest-plugin: verb lock
using C:\Users\Shad\A[ .npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must ins
tall peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"}
(current: {"os":"win32","arch":"x64"})
added 755 packages in 21.316s
C:\Users\Shad\shadfront>npm start
> shadfront#0.1.0 start C:\Users\Shad\shadfront
> node scripts/start.js
module.js:549
throw err;
^
Error: Cannot find module './AsyncDependencyToInitialChunkWarning'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\Shad\shadfront\node_modules\webpack\lib\Compilation.js:23:46)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! shadfront#0.1.0 start: `node scripts/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shadfront#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Shad\AppData\Roaming\npm-cache\_logs\2018-07-17T14_10_23_162Z-debug.log
What should I do in order to have my React app working on my Win10 ?
Thanks

For anyone ending up here, I've managed to fix this problem by removing my .gitiginore and commiting again.

Related

Unable to use `npm run build` due to `\node_modules\tablemark\dist\index.js` being missing

I am trying to use npm run build and I am unable to run is as I am being told that \node_modules\tablemark\dist\index.js is not found. The error is as follows:
> node .
internal/modules/cjs/loader.js:456
throw e;
^
Error: Cannot find module 'D:\Avin Dev\dev-hearts\node_modules\tablemark\dist\index.js'
at createEsmNotFoundErr (internal/modules/cjs/loader.js:929:15)
at finalizeEsmResolution (internal/modules/cjs/loader.js:922:15)
at resolveExports (internal/modules/cjs/loader.js:450:14)
at Function.Module._findPath (internal/modules/cjs/loader.js:490:31)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:888:27)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:93:18)
at Object.<anonymous> (D:\Avin Dev\dev-hearts\index.js:3:19)
at Module._compile (internal/modules/cjs/loader.js:1085:14) {
code: 'MODULE_NOT_FOUND',
path: 'D:\\Avin Dev\\dev-hearts\\node_modules\\tablemark\\package.json'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hearts#1.0.0 build: `node .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hearts#1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\avini\AppData\Roaming\npm-cache\_logs\2021-11-08T07_10_51_261Z-debug.log
So far I have tried:
Completely reinstalling npm.
Installing tablemark separately using npm install tablemark
My NPM version is: 6.14.15 and my Node version is v14.18.1

Not able to install playwright#1.0.2

Hi I am trying to install playwright.
Facing this issue
$ npm i playwright
> playwright#1.0.2 install /Users/chandanj/fr/play-wright-play/node_modules/playwright
> node install.js
internal/util.js:214
throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
^
TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
at promisify (internal/util.js:214:11)
at Object.<anonymous> (/Users/chandanj/fr/play-wright-play/node_modules/extract-zip/index.js:11:18)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/chandanj/fr/play-wright-play/node_modules/playwright-core/lib/install/browserFetcher.js:19:17)
npm WARN play-wright#1.0.0 No description
npm WARN play-wright#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! playwright#1.0.2 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the playwright#1.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Not able to figure out what is causing the issue.
Tried with node versions 12.16.3 and 10.20.1

npm install fails with EACCES: permission denied

I am trying to install Node.js on a Debian 9 (Stretch) box. Initially I run the following commands as root:
curl -Lo node.tar.xz https://nodejs.org/dist/v10.15.0/node-v10.15.0-linux-x64.tar.xz
echo "4ee8503c1133797777880ebf75dcf6ae3f9b894c66fd2d5da507e407064c13b5 node.tar.xz" | sha256sum -c -
tar xJf node.tar.xz
cp -a node-v10.15.0-linux-x64/. /usr/local/
Next I run npm install, from the source dir of the project I am trying to build, with a regular user account, and get the following error:
> git-validate#2.2.2 install /blah/node_modules/git-validate
> node bin/install
fs.js:115
throw err;
^
Error: EACCES: permission denied, open '/blah/.git/hooks/pre-commit'
at Object.openSync (fs.js:439:3)
at Object.writeFileSync (fs.js:1190:35)
at Object.exports.installHooks (/blah/node_modules/git-validate/lib/utils.js:248:12)
at Object.<anonymous> (/blah/node_modules/git-validate/bin/install.js:3:7)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! git-validate#2.2.2 install: `node bin/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the git-validate#2.2.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-01-20T19_55_48_025Z-debug.log
The source dir is a git repo cloned under the same user account which is now running npm install.
What am I doing wrong?

Deployment fails while installing node-sass on Azure linux web app

I'm trying to deploy a website to Azure App Service running Linux, but the deployment fails. The issue seems to be with installing node-sass.
I've set Node to the most recent version that the service supports.
> node-sass#4.11.0 install /home/site/wwwroot/node_modules/node-sass
> node scripts/install.js
fs.js:126
throw err;
^
Error: EINVAL: invalid argument, open '/home/site/wwwroot/node_modules/node-sass/package.json'
at Object.fs.openSync (fs.js:559:3)
at Object.fs.readFileSync (fs.js:465:33)
at Object.Module._extensions..json (internal/modules/cjs/loader.js:695:20)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/home/site/wwwroot/node_modules/node-sass/lib/extensions.js:7:9)
at Module._compile (internal/modules/cjs/loader.js:678:30)
npm WARN ppi-web#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.11.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.11.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
...
npm ERR! A complete log of this run can be found in:
npm ERR! /home/.npm/_logs/2019-02-07T18_09_48_891Z-debug.log
Running "/opt/nodejs/10.1.0/bin/node" "/opt/npm/6.0.1/node_modules/npm/bin/npm-cli.js" run-script build
I followed this guide. After scaffolding express application, I pushed the code to a github repo and used the Azure Extensions in VS Code to configure the deployment source to my recently create github repo and succeeded.
I'm not exactly sure how you deployed but hopefully this will help. Unfortunately I don't have enough reputation points to ask how you went about deploying but please feel free to let me know.

NPM while starting it shows Cannot find module 'safe-buffer'

I am trying to create a Node Restful API service, but npm is giving me an error while starting. In command prompt I have typed the following :
D:\xampp\htdocs\todoListApi>npm run start
todolistapi#1.0.0 start D:\xampp\htdocs\todoListApi
nodemon server.js
It shows following error
[nodemon] 1.17.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node server.js`
internal/modules/cjs/loader.js:550
throw err;
^
Error: Cannot find module 'safe-buffer'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
at Function.Module._load (internal/modules/cjs/loader.js:475:25)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (D:\xampp\htdocs\todoListApi\node_modules\readable-str
eam\lib\_stream_readable.js:55:14)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! todolistapi#1.0.0 start: `nodemon server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the todolistapi#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2018-04-20T06_50_15_
033Z-debug.log
D:\xampp\htdocs\todoListApi>npm install mongoose --sav
npm WARN todolistapi#1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#
1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
Instead it should start npm and show result as
todo list RESTful API server started on: 3000
Please guide me on how I can overcome this.
Try using npm cache clean --force and if it still doesn't work, try to fully re-install NPM/Node :)
The following steps worked for me :
Uninstall Node.js from Control Panel
Go C:/Users/Admin/AppData/Roaming
Delete npm and npm-cache manually
Try installing node.js again.

Resources