npm init results in package manager console stuck with "Press ^C at any time to quit." - vue.js

When I try to type "npm init" in the package console manager it starts the process, but the console is stuck with the message: "Press ^C at any time to quit.". I can create my package.json file, and I am therefore completely stuck. When running the whole program I get the error: "The command "npm run build" exited with code 1.".
Error when running "npm init":
I know a lot of people had success with removing the package_lock.json filer and node_modules folder, but this solves nothing for me. Stuck for 10 hours now - can anyone help?

Related

Run next.js app with npm start, NOT next start (i.e. without next installed)?

Is it possible to run a next.js app without having next installed on the target system? I made a basic next app on my dev computer that has next installed, but the system I want to run it on only has node/npm, not next. When I try to start the app with "npm start" or "npm run dev" it just triggers the start script in package.json that calls next start, giving me 'next' is not recognized as an internal or external command, operable program or batch file.
I tried modifying package.json so instead of start => next start, it would call npm start, but it gave me an error about missing dependencies. Maybe I need to tweak this more, or maybe there is some way of building a next app with npm-pack-all that does not require next?

NPM execution problem "Couldn't find a debug log in the cache or working directory" in Azure pipeline

When I tried to execute
NPM with command npx cypress run
it's displaying following error
2022-08-12T07:37:38.5420694Z ##[warning]Couldn't find a debug log in the cache or working directory
2022-08-12T07:37:38.5433010Z ##[error]Error: Npm failed with return code: 1
so can anyone please help me with how I can solve this problem
thank you
Based on your description and screenshot, it is shown that the main error message in the screenshot is "Unknown command: "npx" ". It means that the issue will occur when using "npm install" this task to run your pipeline, it is suggested that try using "Command Line" task and adding "npx" in "Script" to test again.

What causes the npm error {errno: -4094, code: 'UNKNOWN', syscall: 'readlink'}?

I have been happily building a next.js app over the last couple days without error. Today I installed the firebase npm and suddenly I am getting a strange error when I try to run "npm run dev?
ready - started server on 0.0.0.0:3002, url: http://localhost:3002
[Error: UNKNOWN: unknown error, readlink 'C:\...\seo-site\.next\server\pages\_document.js'] {
errno: -4094,
code: 'UNKNOWN',
syscall: 'readlink',
path: 'C:\\...\\seo-site\\.next\\server\\pages\\_document.js'
}
Even if I uninstall firebase and roll the entire project back to a working build I still get the same error. If I try to run this "broken" build on another computer with the same version of node and npm it runs completely fine. I've tried running npm cache clean --force and npm install -g npm#latest --force several times without any luck.
I have noticed that as I change things I get the error with a different path. Sometimes it's \webpack-runtime.js sometimes its \errors.js and somethimes it's \pages\_document.js'
I cant find anything online or on stack overflow for an error matching this errno or syscall. Has anyone experienced this before or know what is causing this?
deleting the .next file and running npm run dev fixed the issue. I am not sure why this worked but I think it has something to do with next.js trying to use parts of a previous build when you make updates that are causing errors. deleting folder forces next to rebuild everything again.
I tried to go back directories from command line and then reentered into the workplace directory and tried npm run dev. Worked for me.
Right-click the project folder and from the menu choose "Open in integrated Terminal". Then try to run "npm run dev". If it still doesn't work, go back one folder with the command "cd .." and then go back again to the project folder with "cd project folder name". Try running "npm run dev". It worked for me on both occasions. Hope this helps.
Solved by restarting VS Code 🤔
Error occurred seemingly out of nowhere, when restarting the local server with 'npm run dev'. Just doing minor CSS changes to a component in the Nextjs project.

Errors installing vue-storefront

When I run yarn run dev on the vue-storefront, it starts on localhost:3000 and compiles successfully but then brings up this error.
Error: ENOENT: no such file or directory, stat 'C:\Users\HP\Documents\vue-storefront\dist\c849e1b2bfa798743d30.hot-update.json'.
The vue-storefront-api works perfectly and runs on localhost:8080, but when I run localhost:3000, it says something went wrong. How do I fix this?
Run the command yarn cache clean, and then yarn run dev. It would do the job.

IntelliJ stuck after running npm scripts

I have created a Scala, Play project. I am trying to add Angular2 in it. I added two npm commands through edit configuration. They are suppose to install the required packages and use webpack to bundle final JS. I notice that nothing happens after 2nd script is executed (I do not know if that script is hung or there is some other issue (see pic). It seems that the 2nd npm script is stuck because on stopping the run command, I see exit code 1 - Process finished with exit code 1
Is there a way to find out if Intelli build/run process is still running?
The issue was with the 2nd script (npm start). I had to remove --profile --watch flag from the webpack command. This works - "scripts": {
"start": "webpack --config webpack.config.dev.js --progress"
}