I had a project on my old mac that uses npm and node. When I replaced the computer, I copied the file into the new mac, and run npm install and then tried to run a script with browserify that will transpile the code for ES6. I keep getting the error
Error: Cannot find module './args'
which I assume is not a module. I've also tried to reinstall the major modules individually but the error continues. Question: What does it mean when it says "cannot find module './args' and how do I fix that error?
"scripts": {
"build-js": "browserify app/app.js app/goopy.js app/models.js app/goofy.js -t babelify > app/bundle.js"
},
package.json
"devDependencies": {
"babelify": "^5.0.3",
"bower": "^1.3.1",
"http-server": "^0.6.1",
"karma": "^0.12.31",
"karma-junit-reporter": "^0.2.2",
"protractor": "^1.1.1",
"shelljs": "^0.2.6",
"browserify": "latest",
"watchify": "latest",
"gulp": "latest",
"vinyl-source-stream": "latest",
"karma-phantomjs-launcher": "^0.1.4",
"karma-qunit": "^0.1.4"
},
"dependencies": {
"JSON2": "^0.1.0",
"grunt": "^0.4.5",
"grunt-contrib-watch": "^0.6.1",
"gulp": "^3.8.11",
"karma": "0.12.31",
"qunit": "0.7.5",
"requirejs": "^2.1.16",
"sinon": "^1.12.2",
"watchify": "^2.4.0"
}
This is the full error message
Error: Cannot find module './args'
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> (/Users/mm/sites/backbone-seed/node_modules/.bin/browserify:6:9)
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 Function.Module.runMain (module.js:501:10)
Aucun commentaire:
Enregistrer un commentaire