Couldn't install bourbon via ember - javascript

I am using ember-cli=>2.9.1,node=>9.6.1,bower=>1.8.2,npm=>5.6.0
I have created a sample ember app using following command,
ember new // to create ember project.
ember g template application //To create template with application.hbs.
ember install ember-pikaday // To install ember plugin
ember install ember-cli-sass
ember install ember-cli-bourbon
The above ember-cli-bourbon command fails with following exception,
Cannot find module 'resolve'
Error: Cannot find module 'resolve'
at Function.Module._resolveFilename (module.js:557:15)
at Function.Module._load (module.js:484:25)
at Module.require (module.js:606:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/vadivel/POC/ember-
project/sampleProject/node_modules/ember-cli-bourbon/index.js:5:21)
at Module._compile (module.js:662:30)
at Object.Module._extensions..js (module.js:673:10)
at Module.load (module.js:575:32)
at tryModuleLoad (module.js:515:12)
at Function.Module._load (module.js:507:3)
I have also tried following way,
npm install bourbon //successfully installed
ember install ember-cli-install // Fails with same error as described above.
Any help or hint would be appreciated.

There was an issue in v2.0.0 of ember-cli-bourbon where resolve was not included as a dependency. Upgrading to v2.0.1 should solve the issue. To do so, edit your package.json and ensure that the line containing "ember-cli-bourbon" specifies "^2.0.1" and then run npm install.
See https://github.com/yapplabs/ember-cli-bourbon/issues/23 for more information.

Related

Javascript Eslint Error: Cannot find module 'optionator'

We've got some error and we try to install optionator but nothing happened. We're using Linux
We're trying to npm i from package.json which include this dependencies
"optionalDependencies": {
"eslint-config-<name>": "github:<username>/<repo>"
}
then we tried to run npm i optionator but still get the same error
Error: Cannot find module 'optionator'
Require stack:
- /usr/share/nodejs/eslint/lib/options.js
- /usr/share/nodejs/eslint/lib/cli.js
- /usr/share/nodejs/eslint/bin/eslint.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:885:15)
at Function.Module._load (internal/modules/cjs/loader.js:730:27)
at Module.require (internal/modules/cjs/loader.js:957:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/usr/share/nodejs/eslint/lib/options.js:12:20)
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 Module.require (internal/modules/cjs/loader.js:957:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/share/nodejs/eslint/lib/options.js',
'/usr/share/nodejs/eslint/lib/cli.js',
'/usr/share/nodejs/eslint/bin/eslint.js'
Anyone who experienced this, please help us. Thanks
So if you have not done an npm init then that is the issue. npm init initializes the project and will add the node_modules folder to the working directory, this will set it up as a node project. Then to install a dependency just run a npm install <dependency> although I do recommend doing a --save afterwards as well as it just ensures that the package is put in your current directory
$ npm init
$ npm install optionator --save
npm-init | npm Docs
Nothing worked until when I initialized the project in a new directory and reinstalled all the dependent modules afresh.
Need to give full access to package-lock.json
If you are using linux do this
sudo eslint init

Sails lift error 'Cannot find module 'express/node_modules/cookie'

I am trying to create my first sails app and I've followed the steps on the sails getting started (http://sailsjs.org/get-started). But when i try to do a sails lift, i get the following error:
(node:11291) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
module.js:442
throw err;
^
Error: Cannot find module 'express/node_modules/cookie'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/master/Desktop/Developer/NodeJS/HelloSails/node_modules/sails/lib/hooks/session/index.js:9:12)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at /Users/master/Desktop/Developer/NodeJS/HelloSails/node_modules/sails/lib/app/configuration/index.js:54:28
at Function.reduce (/Users/master/Desktop/Developer/NodeJS/HelloSails/node_modules/sails/node_modules/lodash/dist/lodash.js:3735:25)
at Configuration.defaultConfig (/Users/master/Desktop/Developer/NodeJS/HelloSails/node_modules/sails/lib/app/configuration/index.js:53:18)
at Configuration.bound [as defaults] (/Users/master/Desktop/Developer/NodeJS/HelloSails/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21)
I tried manually removing the 'node_modules' folder, inserting express as a dependency in my package.json and running 'npm install', but that did not work.
Im running Node v6.2.2 Sail v0.10.5 and NPM v3.10.6
What am i missing here?
update sails version to latest, it is issue of npm structure, old version use tree level dependency while new version use same level structure
sails upgrade version
It's a dependency issue with npm, this worked for me when I had the issue.
npm -g install npm#latest

Error at module.js:341 when trying to add android platform to ionic from command line

I am going to use the Ionic framework to work on hybrid app development, so I installed all the necessary dependencies (node.js, cordova, etc.) and followed their Getting started section. Step number 3 simply involves running the following command within the app directory:
> ionic platform add android
However midway during the execution I got the following error:
module.js:341
throw err;
^
Error: Cannot find module 'config-chain'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:16:19)
at Object.<anonymous> (C:\Users\james.bonello\AppData\Roaming\npm\node_modules\cordova\node_modules\npm\lib\config\core.js:2:10)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
I ran > npm update first and tried again to see if the update fixes any missing dependencies and such but the problem persisted.
So, as the error clearly states, the module 'config-chain' is missing so I next ran
> npm install config-chain
While that did install the module, the error somehow still persisted (identical to the previous one). I am not sure what to do next and I cannot understand why npm is not recognizing the 'config-chain' module now. Any ideas?
From what I can see, the missing package config-chain is a dependency of the global package cordova.
You should re-install cordova:
npm cache clean
npm uninstall cordova -g
npm install cordova -g
IF the problem persists, you have to manually install the package inside cordova's modules:
C:> cd Users\james.bonello\AppData\Roaming\npm\node_modules\cordova
C:> npm install config-chain
I did npm install and it worked .

After Node / Npm Update, Sails.js unable to find module 'ini'

I am working on an application in Sails.js, and I ran across an authentication error when trying to create user accounts. I was not able to debug my problem, so I decided to update Node, and NPM. Now, a different error is thrown.
module.js:338
throw err;
^
Error: Cannot find module 'ini'
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> (/usr/local/lib/node_modules/sails/node_modules/rc/lib/utils.js:2: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)
I made the mistake of not updating either node, and npm in quite some time.
I did npm install ini. npm states that the installation was successful, however when I lift sails again, the same error is thrown.
I tested another Sails project that I know works correctly, and I am getting the same error.
I completely uninstalled node and npm, and reinstalled them, with no luck.
I removed the node_modules folder, and ran npm install, and got the same error.
I deleted both project folders, and re-cloned them from Github, but the failure is still there.
Out of desperation, I attempted to downgrade my version of node and npm, but oddly enough, I still got the same error.
The error was only present after I updated node. It makes no sense when I downgrade Node, the error persists.
Any assistance is greatly appreciated.
Looks like this problem traces back to the rc package, which has ini as a dependency.
You were on the right track reinstalling your node modules, as some modules with C bindings need to be recompiled to work with later versions of node.
Did you reinstall your global modules as well?
try:
npm remove -g sails
npm install -g sails
Which should recompile all of sails dependencies

Meteor 0.9 Modulus deployment doesn't work - "Cannot find module 'fibers'"

When trying to deploy a newly created Meteor (0.9) app I always get this error message in the Modulus logs:
module.js:340
throw err;
^
Error: Cannot find module 'fibers'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/mnt/data/2/programs/server/boot.js:1:75)
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)
what I did was:
installing meteor with these steps
executing these steps for modulus setup
but even after trying the solution of the question "Can't install, update or run Meteor after update" I can't get it running.
anyone a guess what's wrong here?
After building your bundle, run the following:
cd <bundle dir>/programs/server
sudo npm install
That will install fibers into the bundle and that fixed it for me. Hope this works for you!
This may have something to do with the new architecture of the meteor bundle (the process which converts a Meteor app to a regular Node.js app).
In Meteor < 0.9 you had to run npm install at the root of the bundle to get npm modules installed, now you have to cd in programs/server first, as stated in the README :
This is a Meteor application bundle. It has only one external dependency:
Node.js 0.10.29 or newer. To run the application:
$ (cd programs/server && npm install)
$ export MONGO_URL='mongodb://user:password#host:port/databasename'
$ export ROOT_URL='http://example.com'
$ export MAIL_URL='smtp://user:password#mailhost:port/'
$ node main.js
Use the PORT environment variable to set the port where the
application will listen. The default is 80, but that will require
root on most systems.
Find out more about Meteor at meteor.com.
Modulus developed a tool called demeteorizer which is supposed to automate this process of converting a Meteor app to a Node.js app, and it's possible that they have not yet modified the tool to account for 0.9 changes.
I had the same issue but with building from the Meteorite Heroku buildpack. To save you the frustration of finding an updated buildpack, if you go here, you can use this buildpack that has the updates for Meteor 0.9.x. Thanks #djhi.
Can't tell if this is the same problem, however my app is now running after removing the 'spiderable' package.

Categories

Resources