Error when running vuetifyjs template - node.js

I have successfully installed a vuetifyjs template using the command
vue init vuetifyjs/webpack-advanced
it was successfully installed but when I tried to use the command npm run dev I had the following error message:
C:\Users\Muse\Documents\vuetify>npm run dev
vuetify#1.0.0 dev C:\Users\Muse\Documents\vuetify
node build/dev-server.js
fs.js:1657
binding.lstat(baseLong);
^
Error: ENOENT: no such file or directory, lstat 'C:\Users\Muse\Documents\vuetify\test'
at Object.realpathSync (fs.js:1657:15)
at resolve (C:\Users\Muse\Documents\vuetify\build\webpack.base.conf.js:8:13)
at Object. (C:\Users\Muse\Documents\vuetify\build\webpack.base.conf.js:35:35)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vuetify#1.0.0 dev: node build/dev-server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vuetify#1.0.0 dev 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\Muse\AppData\Roaming\npm-cache_logs\2017-08-31T09_19_06_701Z-debug.log

You just need to create a test folder and give it access.
It's a bug with webpack-advanced template

Fore install your project dependencies
npm install -f
Then, make a folder named "test" in your root project
mkdir test
It's a bug caused by vuetifyjs/webpack-advanced

Related

Not able to start react application - ENOENT: no such file or directory, but its NOT package.json file(The file is present)

I am new to react and I was following the official documentation in order to create my first react app - https://reactjs.org/docs/create-a-new-react-app.html
The commands are simple, I have read many post in many forums but I didn't see someone having this problem.
So I installed node.js with version 14.18.0 LTS which is OK as per the documentation in react (Node >= 14.0.0 and npm >= 5.6). Then I ran the 3 commands again from the documentation:
npx create-react-app my-app
cd my-app
npm start
First two commands are executed successfully, but when I run npm start it fails with the following error:
$ npm start
> my-app#0.1.0 start F:\Programming\my_location\my-app
> react-scripts start
internal/fs/utils.js:259
throw err;
^
Error: ENOENT: no such file or directory, lstat 'C:\Users\streetzaki96\AppData\Local\Temp;F:'
at Object.realpathSync (fs.js:1646:7)
at Object.<anonymous> (F:\Programming\my_location\my-app\node_modules\temp-dir\index.js:9:13)
at Module._compile (internal/modules/cjs/loader.js:1185:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10)
at Module.load (internal/modules/cjs/loader.js:1034:32)
at Function.Module._load (internal/modules/cjs/loader.js:923:14)
at Module.require (internal/modules/cjs/loader.js:1074:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (F:\Programming\my_location\my-app\node_modules\tempy\index.js:5:17)
at Module._compile (internal/modules/cjs/loader.js:1185:30) {
errno: -4058,
syscall: 'lstat',
code: 'ENOENT',
path: 'C:\\Users\\streetzaki96\\AppData\\Local\\Temp;F:'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app#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\streetzaki96\AppData\Roaming\npm-cache\_logs\2021-10-05T21_31_51_222Z-debug.log
The machine which I am trying to run the code is with Windows 8.1 Pro. I also tried running the same commands on another machine which is with Windows 10 and I don't get any error there.
I tried running npm with verbose npm start --verbose to see if I can see something in the log file, but it is the same error message just with more lines of code.

zmq.node: invalid ELF header for Nodejs

I'm building a docker image for a Node.js project and among other dependecies it has "zeromq": "^5.2.0" (which most likely caused the error below).
The dockerfile is:
# We are using the latest Node.js distribution with Long Term Support (LTS) as of 11/04/2020.
FROM node:14.15
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm#5+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm ci --only=production
# Bundle app source
COPY . .
RUN npm run build
EXPOSE 3000
CMD [ "node", "dist/src/app.js" ]
When running a docker instance I receive the following logs
server /usr/src/app
> node dist/src/app.js
internal/modules/cjs/loader.js:1122
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /usr/src/app/node_modules/zeromq/build/Release/zmq.node: invalid ELF header
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/usr/src/app/node_modules/zeromq/lib/index.js:6:11)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bitcoin-broadcast-server#1.3.0 server: `node dist/src/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bitcoin-broadcast-server#1.3.0 server 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/2021-03-05T11_31_06_652Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bitcoin-broadcast-server#1.3.0 start: `npm run server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bitcoin-broadcast-server#1.3.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! /root/.npm/_logs/2021-03-05T11_31_06_791Z-debug.log
The error message (Error: /usr/src/app/node_modules/zeromq/build/Release/zmq.node: invalid ELF header) points out the the ZeroMQ binary is corrupted, but I can't find any fix for it.

Error: ENOENT: no such file or directory, open 'C:\Users\Dylan\AppData\Roaming\npm\node_modules\n_\lodash-3.*.tgz'

I'm trying to setup this program to run on my PC >
https://github.com/BitMEX/api-connectors/tree/master/official-ws/delta-server
I did all the steps, but when I run "node index.js" I get
"Error: Cannot find module 'lodash'"
at Function.Module._resolveFilename (module.js:548:15)
at Function.Module._load (module.js:475:25)
at Module.require (module.js:597:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\official-ws\delta-server\api-connectors\official-
ws\nodejs\index.js:2:11)
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)
So I asked some people on discord, and they told me everything is already setup, I just need to run "npm install -g _n"
So I ran that and I get this error:
Error: ENOENT: no such file or directory, open
'C:\Users\Dylan\AppData\Roaming\npm\node_modules\n_\lodash-3.*.tgz'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! n_#1.4.6 postinstall: `npm pack lodash#^3 && targz extract lodash-
3.*.tgz extraneous/lodash3`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the n_#1.4.6 postinstall 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\Dylan\AppData\Roaming\npm-cache\_logs\2018-09-
15T00_37_09_934Z-debug.log
my question is solved, I had a weird file path that was retarded. now it works.
bad file path > C:\official-ws\delta-server\api-connectors\official-ws\delta-server
good file path > C:\api-connectors\official-ws\delta-server

NPM showing error message after adding the Prop-Types in react project

This is the error message after I finished installation of Prop-Types Validation in my create-react-app
> burgerapp#0.1.0 start C:\Users\ajeet\Desktop\burgerapp
> node scripts/start.js
module.js:540
throw err;
^
Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Users\ajeet\Desktop\burgerapp\scripts\start.js:19:17)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! burgerapp#0.1.0 start: `node scripts/start.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the burgerapp#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\ajeet\AppData\Roaming\npm-cache\_logs\2018-02-04T23_43_08_160Z-debug.log
Please help me to find solution. Thank you for your help.
this just sometimes happens with npm when adding packages, especially with create-react-app projects. Delete node_modules and run npm install again, that should fix it.
You can install webpack by using command 'npm install webpack --dev'.

node-sass install failing on Jenkins

I'm trying to set up Jenkins to run Gulp but it keeps failing while attempting to install node-sass (a dependency of the gulp-sass plugin).
The issue seems to be that node is not finding a script file during install. I verified that script does actually exist in the project repository. When I pull my repo locally on the server and install it, it installs without a problem. That makes me think it's a Jenkins related environment issue.
Here's the error output:
> node-sass#2.1.1 install /root/.jenkins/jobs/odyssey-frontend/workspace/node_modules/gulp-sass/node_modules/node-sass
> node scripts/install.js
module.js:338
throw err;
^
Error: Cannot find module '/root/.jenkins/jobs/odyssey-frontend/workspace/node_modules/gulp-sass/node_modules/node-sass/scripts/install.js'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Linux 3.14.35-28.38.amzn1.x86_64
npm ERR! argv "node" "/home/ec2-user/.linuxbrew/bin/npm" "install" "--production"
npm ERR! node v0.12.2
npm ERR! npm v2.7.6
npm ERR! code ELIFECYCLE
npm ERR! node-sass#2.1.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#2.1.1 install script 'node scripts/install.js'.
npm ERR! This is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/.jenkins/jobs/odyssey-frontend/workspace/npm-debug.log
module.js:338
throw err;
^
Error: Cannot find module 'gulp-sass'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/root/.jenkins/jobs/odyssey-frontend/workspace/gulpfile.js:11:12)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
Build step 'Execute shell' marked build as failure
Finished: FAILURE
The Linux distribution is Amazon Linux AMI, Fedora-like. Trying to install node-sass ^2.0.1 via gulp-sass ^1.3.3.
I just tried the updated gulp-sass 2.0.0 with node-sass 3.0.0 and still have the same issue.
I removed all node-sass dependencies and it builds successfully now. So its really just that package; all other node packages install successfully.
I posted this on the Github project where it was answered: https://github.com/sass/node-sass/issues/941#issuecomment-100414516
Jenkins seems to run everything as sudo when building. NPM, as a security feature, won't run install scripts as sudo, hence the error. Adding a --unsafe-perm flag to the install script gets by this issue.

Resources