Missing write access to node_modules/

Hihi,
I’m having difficulty building a repo I’m installing with NPM from Bitbucket. I’m using postinstall-build, which after installing the repo, is supposed to install the devDependencies and run a particular command. I have "postinstall": "postinstall-build dist grunt" in my package.json.

Anyway, the issue I’m getting is that CircleCI seems to have locked the node_modules dir, is that possible? Because I’m getting the following error when postinstall-build is trying to do it’s thing:

npm WARN checkPermissions Missing write access to /home/ubuntu/axe-devtools-react/node_modules/dq-chrome-extension

I wasn’t able to find anything on this topic. Any ideas?

Any config snippets you can provide?

Here is the circle.yml file:

machine:
  node:
    version: 6.10.0

dependencies:
  pre:
    - npm install -g grunt grunt-cli:
    - npm install:
    - grunt:

And here’s the package.json. You won’t be able to recreate it exactly since the relevant Bitbucket repos are private. But it should tell more of a story:

  {
  "name": "axe-devtools-react",
  "version": "1.0.0",
  "description": "A UI for rendering Axe results, build to run both in the browser, and as an extension for Chrome and Firefox.",
  "repository": {
    "type": "git",
    "url": "https://bitbucket.org/dmusser/axe-devtools-react.git"
  },
  "scripts": {
    "test": "grunt test",
    "start": "grunt serve",
    "postinstall": "postinstall-build dist \"grunt postinstall\""
  },
  "author": "Wilco Fiers (wilco.fiers@deque.com)",
  "license": "MIT",
  "main": "axe-devtools-react.js",
  "dependencies": {
    "axe-core": "^2.2.3",
    "create-react-class": "^15.5.3",
    "dq-chrome-extension": "bitbucket:dmusser/dq-chrome-extension#npm5",
    "dqpl-react": "bitbucket:dmusser/dqpl-react#npm5",
    "es2015-i18n-tag": "^1.1.3",
    "postinstall-build": "^5.0.0",
    "prismjs": "^1.6.0",
    "prop-types": "^15.5.8",
    "react": "^15.4.1",
    "react-dom": "^15.4.1",
    "react-prism": "^4.0.0",
    "react-redux": "^5.0.1",
    "redux": "^3.6.0",
    "redux-thunk": "^2.1.0",
    "what-input": "^4.0.6"
  },
  "devDependencies": {
    "babel-plugin-transform-object-rest-spread": "^6.20.2",
    "babel-preset-es2015": "^6.18.0",
    "babel-preset-react": "^6.16.0",
    "babel-register": "^6.18.0",
    "chai": "^3.5.0",
    "deep-freeze": "0.0.1",
    "envify": "^4.0.0",
    "enzyme": "^2.6.0",
    "eslint": "^3.12.2",
    "eslint-config-standard": "^6.2.1",
    "eslint-config-standard-jsx": "^3.2.0",
    "eslint-config-standard-react": "^4.2.0",
    "eslint-plugin-promise": "^3.4.0",
    "eslint-plugin-react": "^6.8.0",
    "eslint-plugin-standard": "^2.0.1",
    "grunt": "^1.0.1",
    "grunt-babel": "^6.0.0",
    "grunt-browserify": "^5.0.0",
    "grunt-contrib-clean": "^1.0.0",
    "grunt-contrib-connect": "^1.0.2",
    "grunt-contrib-copy": "^1.0.0",
    "grunt-contrib-watch": "^1.0.0",
    "grunt-eslint": "^19.0.0",
    "grunt-mocha-test": "^0.13.2",
    "http-server": "^0.9.0",
    "jsdom": "9.11.0",
    "jsdom-global": "2.1.1",
    "load-grunt-tasks": "^3.5.2",
    "mocha": "^3.2.0",
    "react-addons-test-utils": "^15.4.1",
    "sinon": "^2.2.0",
    "testdouble": "^1.11.1"
  }
}

We’ve resolved the problem. It seems we had broken something in cache.