0
我想在我的本地(我自己的包)中測試一個NPM包。我遵循這個指南:http://rajasekarm.com/publishing-react-component-npm/無法解析模塊index.js npm包
我在的package.json有這樣的:
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "./node_modules/.bin/babel statbox.js -o index.js",
"prepublish": "npm run build"
},
我致力於在我的git這個定製包,並做了一個
npm install 'url/url/my_sample.git' --save
但是,當我做一個:
import myModule from 'my_sample'
它說index.js
是未解決的。我該如何解決這個問題?