I'm installing laravel elixir on my latest homestead machine , working on laravel 5.3, i followed the exact documentation to install laravel elixir, but it didn't worked , it's throwing error regarding sass file. here is snapshot
How do i solve this issue.
test version is ->
```
[19:33:15] Using gulpfile ~/sites/dev.friendsforever/server/gulpfile.js
[19:33:15] Starting 'all'...
[19:33:15] Starting 'sass'...
[19:33:16] 'sass' errored after 169 ms
[19:33:16] Error: ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:856:18)
at Object.getInstalledBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/extensions.js:119:13)
at foundBinariesList (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:45:5)
at Object.<anonymous> (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/index.js:15:28)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
[19:33:16] 'all' errored after 179 ms
[19:33:16] Error in plugin 'run-sequence(sass)'
Message:
ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
Details:
errno: -2
code: ENOENT
syscall: scandir
path: /home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor
Stack:
Error: ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:856:18)
at Object.getInstalledBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/extensions.js:119:13)
at foundBinariesList (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:45:5)
at Object.<anonymous> (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/index.js:15:28)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
```
image version is ->
the problem is the incompatibility between OS and node js, so the solution is just run the command npm rebuild node-sass.
Just run npm rebuild node-sass from within your Host computer. If you have node installed on your computer, it will rebuild node-sass, detect whatever environment your Host computer is, and do something specific to that node-sass build.
Then run gulp command, hope it will work.
If you haven't figured it out by now, you can run
npm install node-sass --no-bin-links
from within the virtual machine and then gulp should work.
If you are getting "Error: ENOENT: no such file or directory..." error run this command. It worked for me.
npm rebuild node-sass
Reference: https://laracasts.com/discuss/channels/elixir/laravel-53-gulp-error-cannot-find-module-laravel-elixir-vue-2
Related
I am trying to install this Github Repo using the Docker image. I am following these instructions and I am getting this error:
Error: ENOENT: no such file or directory, stat '/app/data/ca.srl'
at Object.statSync (fs.js:1127:3)
at internal/fs/utils.js:709:32
at hidden (internal/errors.js:294:14)
at Object.rmSync (fs.js:931:13)
at new <anonymous> (/app/server/index.js:1:71639)
at /app/server/index.js:1:69383
at Object.<anonymous> (/app/server/index.js:1:73817)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
at Module.load (internal/modules/cjs/loader.js:933:32)
at Function.Module._load (internal/modules/cjs/loader.js:774:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '/app/data/ca.srl'
}
However, when I install this using the docker-compose file or the Github repo code, it works perfectly fine.
I am learning docker and trying to figure out why I get this error and how can I fix this.
I am using WSL2, Ubuntu 18.0 LTS on Windows 10.
Thanks in advance 👍
I have a Rails app and something recently changed in such a way that the rails server will start but when I load a page I get an NPM related error in the browser console. I did not set up NPM/VueJS in this app so need some help getting it running locally...
Error: Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /Users/meltemi/rails/myapp/node_modules/#babel/helper-compilation-targets/package.json
at applyExports (internal/modules/cjs/loader.js:524:9)
at resolveExports (internal/modules/cjs/loader.js:541:12)
at Function.Module._findPath (internal/modules/cjs/loader.js:661:22)
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:963:27)
at Function.Module._load (internal/modules/cjs/loader.js:859:27)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (/Users/meltemi/rails/myapp/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/Users/meltemi/rails/myapp/node_modules/#babel/preset-env/lib/debug.js:8:33)
at Module._compile (/Users/meltemi/rails/myapp/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (/Users/meltemi/rails/myapp/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at Object.<anonymous> (/Users/meltemi/rails/myapp/node_modules/#babel/preset-env/lib/index.js:11:14)
at Module._compile (/Users/meltemi/rails/myapp/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Module.require (internal/modules/cjs/loader.js:1036:19)
at require (/Users/meltemi/rails/myapp/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
at requireModule (/Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/files/plugins.js:165:12)
at loadPreset (/Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/files/plugins.js:83:17)
at createDescriptor (/Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/config-descriptors.js:154:9)
at /Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/config-descriptors.js:109:50
at Array.map (<anonymous>)
at createDescriptors (/Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/config-descriptors.js:109:29)
at createPresetDescriptors (/Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/config-descriptors.js:101:10)
at presets (/Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/config-descriptors.js:47:19)
at mergeChainOpts (/Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/config-chain.js:320:26)
at /Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/config-chain.js:283:7
at Generator.next (<anonymous>)
at buildRootChain (/Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/config-chain.js:90:27)
at buildRootChain.next (<anonymous>)
at loadPrivatePartialConfig (/Users/meltemi/rails/myapp/node_modules/#babel/core/lib/config/partial.js:95:62)
at loadPrivatePartialConfig.next (<anonymous>)
This is similar to an issue reported recently in this SO post but in that case NPM wasn't embedded in a Rails app. Regardless I tried their solution by removing node_modules (there is no package-lock.json) and running npm install but that led to more errors in the shell:
$ npm install
npm WARN deprecated postcss-cssnext#3.1.0: 'postcss-cssnext' has been deprecated in favor of 'postcss-preset-env'. Read more at https://moox.io/blog/deprecating-cssnext/
npm WARN deprecated mkdirp#0.5.4: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated popper.js#1.16.1: You can find the new Popper v2 at #popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated browserslist#2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated core-js#2.6.11: core-js#<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js#3.
npm WARN deprecated browserslist#1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! code 1
npm ERR! Command failed: git checkout ^2.4.0
npm ERR! error: pathspec '^2.4.0' did not match any file(s) known to git
npm ERR!
This app is working in production so I'm not interested in updating outdated libraries at the moment. I'm not an NPM/JS guru so would appreciate any advice no matter how rudimentary this probably is. Thanks!
Edit: Results of yarn install --check-files as per request
$ yarn install --check-files
yarn install v1.22.4
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
[3/5] 🚚 Fetching packages...
[4/5] 🔗 Linking dependencies...
[5/5] 🔨 Building fresh packages...
$ node -e "try { require('fs').symlinkSync('../../node_modules/#bower_components', 'vendor/assets/components', 'junction') } catch (e) { }"
✨ Done in 10.22s.
Are you using yarn on your project? If so try:
yarn install --check-files
And please post the result of your terminal.
this my case , just remove node_modules and package-lock.json and run npm installso npm run build working correctly.show here for this answer
Trying to generate a clean jhipster project on a linux mint env
yo jhipster
gives
/home/poc/node_modules/generator-jhipster/generators/app/index.js:15
constructor: function (...args) { // eslint-disable-line object-shorthand
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.defineProperty.get [as jhipster:app] (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js:40:23)
at Store.get (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/store.js:64:35)
at Environment.get (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:262:16)
My
yo doctor
gives
Yeoman Doctor
Running sanity checks on your system
✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ Node.js version
✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✔ npm version
I'm running these versions
nodejs - v4.2.6
npm - 3.5.2
yo - 1.8.5
Any thoughts?
Your NodeJS is too old, JHipster 4 requires 6.9.5, please upgrade node.
I have got Yeoman installed and when I run the yo command I get this:
Error: EACCES, permission denied '/Users/Richard_Home/.config/configstore/insight-yo.yml'
You don't have access to this file.
at Object.fs.openSync (fs.js:427:18)
at Object.fs.writeFileSync (fs.js:966:15)
at Object.create.all.set (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:56:8)
at Object.Configstore (/usr/local/lib/node_modules/yo/node_modules/insight/node_modules/configstore/configstore.js:19:11)
at new Insight (/usr/local/lib/node_modules/yo/node_modules/insight/lib/insight.js:23:34)
at Object.<anonymous> (/usr/local/lib/node_modules/yo/cli.js:23:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
[03:35:36] ~ $
I have tried adding this to my $path:
export PATH=/usr/local/bin/npm:$PATH
as that is where npm is.
When I do sudo yo install generator-webapp
I get this response:
A quick solution would be to change where npm stores global packages by
putting ~/npm/bin in your PATH and running:
npm config set prefix ~/npm
I have run npm config set prefix ~/npm
I still get the same error access denied.
I just want to run yo I have it installed on an iMac and it worked straight away. I am on a macBook.
My Jenkins is running on CentOS 6 with node.js 0.10.15 and bower 1.0.3.
I have a shell task which executes the following:
npm install
bower install
grunt clean package
The bower installation fails when building:
+ bower install
path.js:360
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at Object.<anonymous> (/usr/lib/node_modules/bower/node_modules/
update-notifier/node_modules/configstore/configstore.js:9:7)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
Build step 'Execute shell' marked build as failure
When I'm executing bower install in a terminal while logged in as the Jenkins user, it works. The other mentioned commands work as expected (npm, grunt).
Any ideas?
It appears that your execution environment has neither $XDG_CONFIG_HOME nor $HOME set as environment variables.
You can work around this by manually setting it, for example, to the current workspace:
export XDG_CONFIG_HOME="$WORKSPACE/.config"
...
bower install